-
Bug
-
Resolution: Invalid
-
Minor
-
None
-
None
-
None
-
- No other plugins and code except described below.
-
CraftBukkit version git-Spigot-17d78db-f8d4da0 (MC: 1.16.3) (Implementing API version 1.16.3-R0.1-SNAPSHOT)
-
Yes
How to replicate
- Create a custom inventory with the following code
Inventory inventory = Bukkit.getServer().createInventory(player, 54, "DemoGui"); inventory.setItem(0, new ItemStack(Material.APPLE)); player.openInventory(inventory);
- Cancel every type of InventoryClickEvent
@EventHandler public void inventoryClickEvent(InventoryClickEvent event) { event.setCancelled(true); System.out.println(event.getAction().toString() + " cancelled."); }
- Observe that clicking on the apple with your mouse is correctly cancelled and the item does not move.
- Move your mouse of the item and press "F"
- Observe that the inventory item is copied to the offhand slot
Expected behaviour:
The item does not get copied to the offhand slot if the InventoryClickEvent is cancelled.
- is duplicated by
-
SPIGOT-6291 Ghost item in inventory after cancelling an item swap in inventory
- Resolved