Closes gh-89. Closes gh-90. Couldn't reproduce warhub and lobby reset bugs. Closing for now. Did fix a few exceptions that might have been at the root of this, though improbable.

This commit is contained in:
taoneill 2011-03-21 00:06:31 -04:00
parent b8fba72f2d
commit d81a198feb
2 changed files with 9 additions and 5 deletions

View File

@ -333,8 +333,10 @@ public class War extends JavaPlugin {
VolumeMapper.delete(warHub.getVolume(), this);
this.warHub = null;
for(Warzone zone : warzones) {
zone.getLobby().getVolume().resetBlocks();
zone.getLobby().initialize();
if(zone.getLobby() != null) {
zone.getLobby().getVolume().resetBlocks();
zone.getLobby().initialize();
}
}
this.msg(player, "War hub removed.");
@ -356,8 +358,10 @@ public class War extends JavaPlugin {
warHub = new WarHub(this, player.getLocation());
warHub.initialize();
for(Warzone zone : warzones) {
zone.getLobby().getVolume().resetBlocks();
zone.getLobby().initialize();
if(zone.getLobby() != null) {
zone.getLobby().getVolume().resetBlocks();
zone.getLobby().initialize();
}
}
msg(player, "War hub created.");
}

View File

@ -304,7 +304,7 @@ public class WarPlayerListener extends PlayerListener {
WarHub hub = war.getWarHub();
if(hub != null && hub.getVolume().contains(playerLoc)) {
Warzone zone = hub.getDestinationWarzoneForLocation(playerLoc);
if(zone != null) {
if(zone != null && zone.getTeleport() != null) {
enteredGate = true;
event.setFrom(zone.getTeleport());
player.teleportTo(zone.getTeleport());