When cancelling a PlayerInteractAtEntityEvent when clicking on a villager, the trading menu still opens. I assume this is incorrect behaviour as the setCancelled method, should cancel the event like nothing happened.
Here is the code I used to test this:
@EventHandler(priority = EventPriority.MONITOR) public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent e) { System.out.println("Cancelled"); e.setCancelled(true); }
"Cancelled" does appear in the console, but the trading menu still opens.
- is duplicated by
-
SPIGOT-5387 PlayerInteractAtEntityEvent issues
- Resolved