my code:http://pastebin.com/2mrFV8GW | GoldEnchant.java http://pastebin.com/sDZbAahZ | GoldEnchantPlayerListener.java http://pastebin.com/szVfEUQ4 | GoldEnchantEntityListener.javaMy Error:http://pastebin.com/pdexaW2v | Server.log What Causes The Error:hitting a playersincerely, kman2010 p.s. I'm a noob at java so please be nice. p.s.s also here is the link to my idea http://forums.bukkit.org/threads/fu...scusion-used-to-enchant-gold-items-wip.16782/
You need to make sure there's actually a block available before checking its type. There's more than one way to do this. if (event.getClickedBlock() != null) if (event.getAction() == Action.RIGHT_CLICK_BLOCK) if (event.hasBlock())