I'm getting this error and I honestly have no idea what to do to fix it, I've tried everything I can think of.
The code is to check the player's boot slot to see if he has diamond boots on, and if they do, to set it as air as it is a banned item.
The error:
Too big to paste in here so here it is: http://pastebin.com/zhzc3Hut
The code:
@EventHandler
public void onInventoryClickBoots(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();
if(player.getInventory().getBoots().getType().equals(Material.DIAMOND_BOOTS)){
player.getInventory().setBoots(new ItemStack(Material.AIR));
}
else {
}
}
I'm also getting this repeated error for the helmet, chestplate and leggings slot too.
Thanks in advance for anyone that is able to help me out! An explanation of what's going on would also be greatly appreciated!