From 9c7ed3bf386ffff14ac85ac511901b357044fdad Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sun, 11 Nov 2012 13:05:58 -0600 Subject: [PATCH] Fix for pistons being able to push blocks into protected territory through water or lava --- .../factions/listeners/FactionsBlockListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/massivecraft/factions/listeners/FactionsBlockListener.java b/src/com/massivecraft/factions/listeners/FactionsBlockListener.java index 7981fc97..b9ffdfde 100644 --- a/src/com/massivecraft/factions/listeners/FactionsBlockListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsBlockListener.java @@ -133,8 +133,8 @@ public class FactionsBlockListener implements Listener Faction targetFaction = Board.getFactionAt(new FLocation(targetBlock)); if (targetFaction == pistonFaction) return; - // if potentially pushing into air in another territory, we need to check it out - if (targetBlock.isEmpty() && ! FPerm.BUILD.has(pistonFaction, targetBlock.getLocation())) + // if potentially pushing into air/water/lava in another territory, we need to check it out + if ((targetBlock.isEmpty() || targetBlock.isLiquid()) && ! FPerm.BUILD.has(pistonFaction, targetBlock.getLocation())) { event.setCancelled(true); } @@ -154,8 +154,8 @@ public class FactionsBlockListener implements Listener Location targetLoc = event.getRetractLocation(); - // if potentially retracted block is just air, no worries - if (targetLoc.getBlock().isEmpty()) return; + // if potentially retracted block is just air/water/lava, no worries + if (targetLoc.getBlock().isEmpty() || targetLoc.getBlock().isLiquid()) return; Faction pistonFaction = Board.getFactionAt(new FLocation(event.getBlock()));