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) { public Warzone warzone(Location location) {
for(Warzone warzone : warzones) { 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; return null;
} }

View File

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