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:
drtshock 2014-11-08 19:07:42 -06:00
parent ccd8720b09
commit 81182dccaa
2 changed files with 12 additions and 0 deletions

View File

@ -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()) {

View File

@ -23,6 +23,11 @@ findfactionsexploit:
# What should be the max amount of warps that a Factoin can set?
max-warps: 5
# Pistons
# Should we disable pistons in Faction territory? This will prevent people from doing something like:
# http://i.gyazo.com/6a1a31222e58a5d60ff341c13f6a8404.gif
disable-pistons-in-territory: false
# Configuration section for Scoreboards
# This will allow you to completely customize how your scoreboards look.
# Make sure that no lines are duplicates of each other otherwise only the first will display.