Closes gh-91. Closes gh-102. Warzones min size is now 10x10 and max size 750x750. Use large warzones at your own risk. NPE fixed when checking for important blocks in unfinished warzone.

This commit is contained in:
taoneill 2011-03-20 19:41:23 -04:00
parent e1fa801664
commit a5988c242c

View File

@ -550,26 +550,24 @@ public class Warzone {
} }
public boolean isImportantBlock(Block block) { public boolean isImportantBlock(Block block) {
block.getX(); if(ready()) {
for(Monument m : monuments) { for(Monument m : monuments) {
if(m.getVolume().contains(block)){ if(m.getVolume().contains(block)){
return true; return true;
}
} }
} for(Team t : teams) {
for(Team t : teams) { if(t.getSpawnVolume().contains(block)){
if(t.getSpawnVolume().contains(block)){ return true;
return true; } else if (t.getFlagVolume() != null
} else if (t.getFlagVolume() != null && t.getFlagVolume().contains(block)) {
&& t.getFlagVolume().contains(block)) { return true;
return true; }
} }
if(volume.isWallBlock(block)){
return true;
}
} }
if(volume.isWallBlock(block)){
return true;
}
// if(lobby != null) {
// lobby.getVolume().contains(block);
// }
return false; return false;
} }