-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
None
-
git-Spigot-f09662d-7c395d4
-
Yes
It is really weird:
PlayerInteractEvent#hasItem returns false for stone shovel while Material#STONE_SHOVEL#isItem returns true. See my code for clearer understanding.
if (!e.getAction().equals(Action.RIGHT_CLICK_BLOCK) || !e.hasBlock() || !e.hasItem())
{ new DebugMessage("Event cancelled because of no right-click/block/item"); #fired if (e.hasBlock()) new DebugMessage("Event got block!"); #fired if (e.hasItem()) new DebugMessage("Event got item!"); #did not fire if (Material.STONE_SHOVEL.isItem()) new DebugMessage("Stone_Shovel is item!"); #fired }
I added comments on which fired and which not (new DebugMessage is just a console message)
Please note that this bug persists for all other shovel types.