Add option to completely disable pistons in faction territory.
This is a preemptive method to block new things like http://i.gyazo.com/6a1a31222e58a5d60ff341c13f6a8404.gif
This commit is contained in:
@@ -98,6 +98,13 @@ public class FactionsBlockListener implements Listener {
|
||||
}
|
||||
|
||||
Location targetLoc = event.getRetractLocation();
|
||||
Faction otherFaction = Board.getInstance().getFactionAt(new FLocation(targetLoc));
|
||||
|
||||
// Check if the piston is moving in a faction's territory. This disables pistons entirely in faction territory.
|
||||
if(otherFaction.isNormal() && P.p.getConfig().getBoolean("disable-pistons-in-territory", false)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// if potentially retracted block is just air/water/lava, no worries
|
||||
if (targetLoc.getBlock().isEmpty() || targetLoc.getBlock().isLiquid()) {
|
||||
|
||||
Reference in New Issue
Block a user