When right click a block with a block in the off-hand (place the block) and the main hand is empty, the PlayerInteractEvent called twice (one time with an item and another time without, probably call for each hand)
Code:
@EventHandler public void onPlayerIneractEvent(PlayerInteractEvent e) { System.out.println("onPlayerIneractEvent() called"); System.out.println("onPlayerIneractEvent() item: " + (e.hasItem() ? e.getItem().getType() : "null")); }
Result (Sand in the off-hand, nothing in the main hand):
[22:55:50 INFO]: onPlayerIneractEvent() called
[22:55:50 INFO]: onPlayerIneractEvent() item: null
[22:55:50 INFO]: onPlayerIneractEvent() called
[22:55:50 INFO]: onPlayerIneractEvent() item: SAND