made "worldGuardBuildPriority" apply in Wilderness and WarZone, not just SafeZone

This commit is contained in:
Brettflan 2013-04-12 11:59:33 -05:00
parent 96dafe4327
commit a4e06db112
1 changed files with 9 additions and 6 deletions

View File

@ -173,6 +173,9 @@ public class FactionsBlockListener implements Listener
if (otherFaction.isNone()) if (otherFaction.isNone())
{ {
if (Conf.worldGuardBuildPriority && Worldguard.playerCanBuild(player, location))
return true;
if (!Conf.wildernessDenyBuild || Conf.worldsNoWildernessProtection.contains(location.getWorld().getName())) if (!Conf.wildernessDenyBuild || Conf.worldsNoWildernessProtection.contains(location.getWorld().getName()))
return true; // This is not faction territory. Use whatever you like here. return true; // This is not faction territory. Use whatever you like here.
@ -183,12 +186,9 @@ public class FactionsBlockListener implements Listener
} }
else if (otherFaction.isSafeZone()) else if (otherFaction.isSafeZone())
{ {
if (Conf.worldGuardBuildPriority) if (Conf.worldGuardBuildPriority && Worldguard.playerCanBuild(player, location))
{ return true;
if (Worldguard.playerCanBuild(player, location))
return true;
}
if (!Conf.safeZoneDenyBuild || Permission.MANAGE_SAFE_ZONE.has(player)) if (!Conf.safeZoneDenyBuild || Permission.MANAGE_SAFE_ZONE.has(player))
return true; return true;
@ -199,6 +199,9 @@ public class FactionsBlockListener implements Listener
} }
else if (otherFaction.isWarZone()) else if (otherFaction.isWarZone())
{ {
if (Conf.worldGuardBuildPriority && Worldguard.playerCanBuild(player, location))
return true;
if (!Conf.warZoneDenyBuild || Permission.MANAGE_WAR_ZONE.has(player)) if (!Conf.warZoneDenyBuild || Permission.MANAGE_WAR_ZONE.has(player))
return true; return true;