@EventHandler public void onBlockBuilt(BlockCanBuildEvent event) { location = new dLocation(event.getBlock().getLocation()); old_material = dMaterial.getMaterialFrom(event.getBlock().getType(), event.getBlock().getData()); new_material = dMaterial.getMaterialFrom( event.getMaterial()); // Deprecated because it doesn't have proper data cancelled = !event.isBuildable(); this.event = event; fire(); event.setBuildable(!cancelled); }
public void onBlockCanBuild(BlockCanBuildEvent e) { ZombieSiegeGame game = instance.getGame(); if (game == null) { return; } int x = e.getBlock().getX(); int y = e.getBlock().getY(); int z = e.getBlock().getZ(); int baseX = game.getBase().getBlock().getX(); int baseY = game.getBase().getBlock().getY(); int baseZ = game.getBase().getBlock().getZ(); if ((x == baseX && y == baseY + 1 && z == baseZ) || (x == baseX && y == baseY && z == baseZ)) { e.setBuildable(false); } }
/* */ @EventHandler /* */ public void onBlockCanBuild(BlockCanBuildEvent event) /* */ { /* 60 */ Block block = event.getBlock(); /* 61 */ if (block.getType() == Material.TORCH) /* 62 */ event.setBuildable(true); /* */ }
@EventHandler public void BlockCanBuildEvent(BlockCanBuildEvent event) { if (!arena.getRegion().isInside(event.getBlock().getLocation()) || arena.getEditMode()) return; if (arena.getArena().isInside(event.getBlock().getLocation()) && arena.isRunning()) return; event.setBuildable(false); }
public void onBlockCanBuild(BlockCanBuildEvent curEvent) { if (FlowerFarm.isTimer(curEvent.getBlock())) { curEvent.setBuildable(true); } }