-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
If a minecart is placed on a rail, any PlayerInteractEvents are called twice. If "event.setCancelled(true)" is called in the second iteration, it also cancels the first.
I have attached a screenshot of what happens after clicking once on rails with a minecart. The code for which is simply:
@EventHandler(priority = EventPriority.LOWEST) public void onPlayerInteract(PlayerInteractEvent event) { Player player = event.getPlayer(); Block block = event.getClickedBlock(); if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { player.sendMessage("Event called"); } }