The cancelled event shouldn't be taking the item from the inventory.
The event is cancelling the item "partially": It will not remove the item from the inventory but it will place the item in the offhand.


Tell the plugin author? Not us?
It's not from the author, it's a problem of cancelling the event. Try calling every click and then using the off hand, it will make the error.
Literally works fine, stop using 1.14 too. The worst version you can be on and highly unsupported.
Literally works fine, stop using 1.14 too. The worst version you can be on and highly unsupported.
Here is a video on the last version, showing the code of a code that cancels every click and it shows how the item goes into the off hand .
https://youtu.be/igq3ZVDn9BU
This is a huge issue for our network, affecting a lot of core plugins including GuiPlus, AuctonHouse, Denizen, Ultra Cosmetics. A fix would be greatly appreciated we're on 1.16.3
Can confirm but it's a visual bug/fake item on the client's end.
https://i.imgur.com/p6XC7k6.mp4
I also confirm it is a clientside visual glitch. But the problem you are seeing, is that creative mode makes fake items real.
You will still get the visual glitch in Survival, but it won't ever become tangible.
I have marked this issue accepted as the visual glitch aspect. There is not an issue of the cancelling not working. Creative mode is the cause of the items substantiating later.
I did some research on this issue. Re-stating that it is a visual issue. I cannot seem to update that off hand item from any updateInventory calls or even setting the item directly with .setItemInOffHand while an inventory is up on the screen.
But anyway, I am thinking this is also a bug only that can be fixed on the client. https://bugs.mojang.com/browse/MC-87019
Is the relevant mojang ticket.
I am going to close this issue for the time being since it can only be resolved in the client. Your best Bukkit/Paper solution would be to update a player's inventory with the InventoryCloseEvent.