mirror of
https://github.com/taoneill/war.git
synced 2024-11-27 12:46:11 +01:00
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:
parent
e1fa801664
commit
a5988c242c
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user