Auto assign gate exemptions for wall guard.

This commit is contained in:
taoneill 2011-01-18 11:05:38 -05:00
parent 33bebcd928
commit 0ac179bb89
2 changed files with 16 additions and 8 deletions

View File

@ -376,7 +376,7 @@ public class War extends JavaPlugin {
} else if (warzone.tooSmall()) {
message += " Warzone " + warzone.getName() + " is too small. Min north-south size: 20. Min east-west size: 20.";
} else if (warzone.tooBig()) {
message += " Warzone " + warzone.getName() + " is too Big. Max north-south size: 1000. Max east-west size: 1000.";
message += " Warzone " + warzone.getName() + " is too Big. Max north-south size: 500. Max east-west size: 500.";
}
}
player.sendMessage(this.str(message));
@ -486,6 +486,10 @@ public class War extends JavaPlugin {
}
if(updateZoneFromNamedParams(warzone, arguments)) {
WarzoneMapper.save(this, warzone, false);
warzone.getVolume().resetBlocks();
if(lobby != null) {
lobby.getVolume().resetBlocks();
}
warzone.initializeZone(); // bring back team spawns etc
player.sendMessage(this.str("Warzone config saved. Zone reset."));
} else {
@ -735,10 +739,10 @@ public class War extends JavaPlugin {
WarMapper.save(this);
}
// /setzoneconfig
// /setwarconfig
else if(command.equals("setwarconfig")) {
if(arguments.length == 0) {
player.sendMessage(this.str("Usage: /setwarconfig lifepool:8 teamsize:5 maxscore:7 autoassign:on outline:off ff:on " +
player.sendMessage(this.str("Usage: /setwarconfig pvpinzonesonly:on lifepool:8 teamsize:5 maxscore:7 autoassign:on outline:off ff:on " +
"Changes the server defaults for new warzones. Please give at leaset one named parameter. Must be in warzone."));
} else {
if(updateFromNamedParams(arguments)) {
@ -878,6 +882,9 @@ public class War extends JavaPlugin {
} else if(namedParams.containsKey("outline")){
String onOff = namedParams.get("outline");
setDefaultDrawZoneOutline(onOff.equals("on"));
} else if(namedParams.containsKey("pvpinzonesonly")){
String onOff = namedParams.get("pvpinzonesonly");
setDefaultDrawZoneOutline(onOff.equals("on"));
}
return true;
} catch (Exception e) {

View File

@ -303,7 +303,7 @@ public class ZoneLobby {
autoAssignGate.getFace(leftSide).setType(TeamMaterials.TEAMDIAMOND);
autoAssignGate.getFace(leftSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMIRON);
autoAssignGate.getFace(leftSide).getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMDIAMOND);
autoAssignGate.getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMDIAMOND);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMIRON);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(rightSide).setType(TeamMaterials.TEAMDIAMOND);
@ -311,7 +311,7 @@ public class ZoneLobby {
autoAssignGate.getFace(leftSide).setType(TeamMaterials.TEAMDIAMOND);
autoAssignGate.getFace(leftSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMIRON);
autoAssignGate.getFace(leftSide).getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMDIAMOND);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMIRON);
autoAssignGate.getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMIRON);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMDIAMOND);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMIRON);
autoAssignGate.getFace(rightSide).setType(TeamMaterials.TEAMDIAMOND);
@ -319,7 +319,7 @@ public class ZoneLobby {
autoAssignGate.getFace(leftSide).setType(TeamMaterials.TEAMIRON);
autoAssignGate.getFace(leftSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(leftSide).getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMIRON);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMIRON);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(rightSide).setType(TeamMaterials.TEAMIRON);
@ -327,7 +327,7 @@ public class ZoneLobby {
autoAssignGate.getFace(leftSide).setType(TeamMaterials.TEAMDIAMOND);
autoAssignGate.getFace(leftSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(leftSide).getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMDIAMOND);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).getFace(BlockFace.UP).setType(TeamMaterials.TEAMDIAMOND);
autoAssignGate.getFace(rightSide).getFace(BlockFace.UP).setType(TeamMaterials.TEAMGOLD);
autoAssignGate.getFace(rightSide).setType(TeamMaterials.TEAMDIAMOND);
@ -392,7 +392,8 @@ public class ZoneLobby {
if(blockWall == wall) {
return isPartOfGate(diamondGate, block)
|| isPartOfGate(ironGate, block)
|| isPartOfGate(goldGate, block);
|| isPartOfGate(goldGate, block)
|| isPartOfGate(autoAssignGate, block);
}
return false;
}