-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
CraftBukkit version git-Bukkit-9820cd2
-
just my tester plugin
-
Yes
So we found an issue in another plugin, and after further testing realized this was a Spigot/CB issue.
The player interact event is fired when you drop an item, whilst not looking at a block (ie: looking up at the sky)
If you are focused on a block (where you can see the block's hitbox) the interact event will not fire.
Simple code for testing:
@EventHandler private void onClick(PlayerInteractEvent event) { Bukkit.broadcastMessage("Player interacted"); } @EventHandler private void onDrop(PlayerDropItemEvent event) { Bukkit.broadcastMessage("Player dropped"); }
Tested this on CraftBukkit and Spigot
Focused on a block, dropping an item:
Looking up at the sky dropping an item:
Included a little tester plugin.
- duplicates
-
SPIGOT-5435 Hand calls twice PlayerInteractEvent when using potions
- Resolved