mirror of
https://github.com/taoneill/war.git
synced 2024-11-23 18:55:28 +01:00
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:
parent
b8fba72f2d
commit
d81a198feb
@ -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.");
|
||||
}
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user