fix for piston retraction not working if faction doesn't have build rights in its own territory; missed this when fixing the same thing for piston extension recently
This commit is contained in:
parent
5c45ea5ee2
commit
95289e1411
@ -159,6 +159,10 @@ public class FactionsBlockListener implements Listener
|
||||
|
||||
Faction pistonFaction = Board.getFactionAt(new FLocation(event.getBlock()));
|
||||
|
||||
// members of faction might not have build rights in their own territory, but pistons should still work regardless; so, address that corner case
|
||||
Faction targetFaction = Board.getFactionAt(new FLocation(targetLoc));
|
||||
if (targetFaction == pistonFaction) return;
|
||||
|
||||
if ( ! FPerm.BUILD.has(pistonFaction, targetLoc))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user