Piston Fix

This commit is contained in:
Driftay 2019-09-01 09:29:25 -04:00
parent e05dae1c11
commit 53a79ade27
1 changed files with 5 additions and 1 deletions

View File

@ -303,7 +303,11 @@ public class FactionsBlockListener implements Listener {
return;
}
Location targetLoc = event.getRetractLocation();
if (event.getBlocks().isEmpty()) {
return;
}
Location targetLoc = event.getBlocks().get(0).getLocation();
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.