Hi community! I have a super weird occasion on my project: The BlockPlaceEvent stopped working. Sounds very dumb but it's actually the case. All other events in the SAME class work fine, the BlockBreakEvent aswell... I have no idea whats going on and it used to work before. Spoiler: BlockBreakEvent listener Code (Text): @EventHandler public void onBlockPlace(BlockPlaceEvent e) { Bukkit.broadcastMessage("TEST"); //DEBUG bpe = e; Player p = e.getPlayer(); Block b = e.getBlock(); if(plugin.ge.edit.containsKey(p.getUniqueId())) { plugin.ge.editGate(p, e.getBlock(), plugin.ge.edit.get(p.getUniqueId()).split("%")[0], plugin.ge.edit.get(p.getUniqueId()).split("%")[1]); return; } else if(plugin.d.edit.containsKey(p.getUniqueId())) { plugin.d.saveDoor(b, plugin.d.edit.get(p.getUniqueId()), p); return; } if(plugin.editors.contains(p.getUniqueId())) return; if(plugin.started == true) { if(b.getType().equals(Material.WOOL) || b.getType().equals(Material.BANNER) || b.getType().equals(Material.STANDING_BANNER) || b.getType().equals(Material.WALL_BANNER)) { Bukkit.broadcastMessage("ID"); //DEBUG identify(b, true, p); } else { if(plugin.bk.getRelative(b, p).isEmpty()) e.setCancelled(true); } } else { e.setCancelled(true); } } I suppose it's not very useful to post this code since it's 100% correct. The other events are registered properly wich means there can't be an issue with imports or wrong event registering. I tried setting up a different BlockPlaceEvent in a different listener class. It also didn't work. All that happens when I place a block is, it gets cancelled but no debug message (line 4) is shown. This problem drives me mad and I wanted to ask if anyone knows about this or a solution for it! thanks in advance! Ziron5
Doesn't matter I solved it myself. I cancelled the playerInteractEvent... I am not a smart man. As it seems this kills the BlockPlaceEvent as the player interacts with a block by placing a block. closed and solved ^^
Theres was also a problem with NoCheatPlus recently, where players couldn't place blocks if they had a to high ping Nearly everyone had a too high ping
Never heard of debugging? http://www.spigotmc.org/wiki/eclipse-debug-your-plugin/?noRedirect=1 Next time you know what you have to do