Merge pull request #249 from Evil-Code/opsAreZonemakers

Improved code a bit :)
This commit is contained in:
taoneill 2011-07-16 09:41:49 -07:00
commit 0132699d0e

View File

@ -1433,8 +1433,7 @@ public class War extends JavaPlugin {
return true;
}
// w/o Permissions, if buildInZonesOnly, no one can build outside the zone except Zonemakers
if(isZoneMaker(player)) return true;
else return false;
return isZoneMaker(player);
} else {
return true;
}
@ -1455,24 +1454,24 @@ public class War extends JavaPlugin {
}
public boolean isZoneMaker(Player player) {
boolean isPlayerImpersonator = false;
for(String disguised : zoneMakersImpersonatingPlayers) {
if(disguised.equals(player.getName())) isPlayerImpersonator = true;
}
if(!isPlayerImpersonator) {
if(player.isOp()) {
return true;
if(disguised.equals(player.getName())) return false;
}
for(String zoneMaker : zoneMakerNames) {
if(zoneMaker.equals(player.getName())) return true;
}
if( War.permissionHandler != null
&& (War.permissionHandler.has(player, "war.*")
|| War.permissionHandler.has(player, "War.*"))) {
&& (
War.permissionHandler.has(player, "war.*")
|| War.permissionHandler.has(player, "War.*")
)
) {
return true;
}
else {
return player.isOp();
}
return false;
}
public boolean getDefaultAutoAssignOnly() {