Im having a problem below on line 17 (so the check if the item type is a gold ingot) The problem is I am able to right click with a block no problem, also no problem right clicking air with an empty hand; however I am getting a nullpointer when I right click a block with an empty hand. I also tried a check to see if the hand is empty but that didn't work. Its probably something really simple, but I cannot pinpoint it Thanks guys! Code: public class goldclicklistener implements Listener { @EventHandler(priority = EventPriority.HIGH) public void clickGoldEvent(PlayerInteractEvent e){ Player p = e.getPlayer(); if (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK){ if (e.getItem().getType() == Material.GOLD_INGOT){ p.getInventory().remove(Material.GOLD_INGOT); } } } }