Lobby gates in other NORMAL worlds should now work. Nether lobbies are still broken, though.

This commit is contained in:
taoneill 2011-03-20 18:01:06 -04:00
parent c9d3a9867d
commit 4b9c0d0a1c
2 changed files with 4 additions and 3 deletions

View File

@ -1212,7 +1212,8 @@ public class War extends JavaPlugin {
public Warzone warzone(Location location) {
for(Warzone warzone : warzones) {
if(warzone.getVolume() != null && warzone.getVolume().contains(location)) return warzone;
if(location.getWorld().getName().equals(warzone.getWorld().getName())
&& warzone.getVolume() != null && warzone.getVolume().contains(location)) return warzone;
}
return null;
}

View File

@ -366,7 +366,7 @@ public class Volume {
int y = location.getBlockY();
int z = location.getBlockZ();
return hasTwoCorners() &&
location.getWorld() == world &&
location.getWorld().getName().equals(world.getName()) &&
x <= getMaxX() && x >= getMinX() &&
y <= getMaxY() && y >= getMinY() &&
z <= getMaxZ() && z >= getMinZ();
@ -377,7 +377,7 @@ public class Volume {
int y = block.getY();
int z = block.getZ();
return hasTwoCorners() &&
block.getWorld() == world &&
block.getWorld().getName().equals(world.getName()) &&
x <= getMaxX() && x >= getMinX() &&
y <= getMaxY() && y >= getMinY() &&
z <= getMaxZ() && z >= getMinZ();