why doesn't this work?? Code: public class Core extends JavaPlugin implements Listener{ public void onEnable(){ getServer().getPluginManager().registerEvents(this, this); getLogger().info("odjawdawd"); } @EventHandler public void onMove(PlayerMoveEvent e){ Player p = e.getPlayer(); if(p.getInventory().getItemInHand().equals(Material.STICK)){ Block b = p.getLocation().getBlock(); if(!(b.getRelative(BlockFace.DOWN).getType().equals(Material.TNT))){ b.setType(Material.TNT); p.sendMessage(ChatColor.GREEN + "[Tnt] Placed block of tnt"); } } } }
First, I believe you need to override the onEnable and you also need to add onDisable and override that too. Thats just from a quick look.
Again, don't expect us to magically know exactly what you're thinking. Doesn't work how? What is it supposed to do and what does it actually do? EDIT: Another quick look and I see you are comparing an ItemStack with a Material. Those will never be equal and the condition is always false. None of what you've mentioned will make a difference.