/** Detect when pistons affect water or sensor components. PISTONS MAH BOI! */ @EventHandler public void onBlockPistonExtend(BlockPistonExtendEvent event) { if (event.isCancelled()) return; // Get the block just at the end of the piston chain (that will be replaced when the chain is // pushed) Block endblock = event.getBlock().getRelative(event.getDirection(), event.getLength() + 1); BlockState b = endblock.getState(); plugin.debugprint("Block at end of piston chain " + b.getType()); if (plugin.isBlockStateAnUpdater(b)) { plugin.executeSensorsAroundBlock(b, true, event); } }