-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
None
-
Windows 10
Java 8
Intellij Idea debugging in a terminal window.
-
CraftBukkit version git-Spigot-9639cf7-8fb6585 (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)
-
Prism-Bukkit
-
Yes
When you right click a lectern with a book the resulting event contains
the player and the item.
Both the event.getItem() and the player.getInv.getIteminMainHand return an interesting item
the handle is clearly correct -CraftItem - in the test case a book
however the item.getType = AIR and the amount = 0
I have attached a snippet from a debug session the code used to retrieve the data is
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) private void playerInteractEventMonitor(PlayerInteractEvent event) { final Player player = event.getPlayer(); Block block = event.getClickedBlock(); ItemStack hand = player.getInventory().getItemInMainHand(); ItemStack item = event.getItem();
This was replicated while testing an implementation of my logging plugin Prism-Bukkit,
It was the only plugin installed.