Closes gh-406. The inventory reset fix seems to not have broken anything important - good. Fixed lobby disappearing with new /teamcfg and /zonecfg that dont reset the zone anymore.

This commit is contained in:
taoneill 2012-04-06 22:19:44 -04:00
parent 2c773710ba
commit 305b2454c7
5 changed files with 6 additions and 13 deletions

View File

@ -284,6 +284,9 @@ public class Warzone {
// reset lobby (here be demons)
if (this.lobby != null) {
if (this.lobby.getVolume() != null) {
this.lobby.getVolume().resetBlocks();
}
this.lobby.initialize();
}
@ -880,7 +883,7 @@ public class Warzone {
}
this.handleScoreCapReached(player, winnersStr);
// player.teleport(playerWarzone.getTeleport());
// player will die because it took too long :(
// we dont restore his inventory in handleScoreCapReached
// check out PLAYER_MOVE for the rest of the fix

View File

@ -78,9 +78,7 @@ public class RenameZoneCommand extends AbstractZoneMakerCommand {
War.war.getWarzones().add(newZone);
// zone.getVolume().loadCorners();
newZone.getVolume().loadCorners();
if (newZone.getLobby() != null) {
newZone.getLobby().getVolume().resetBlocks();
}
if (newZone.getWarzoneConfig().getBoolean(WarzoneConfig.RESETONLOAD)) {
newZone.getVolume().resetBlocks();
}

View File

@ -54,9 +54,7 @@ public class ResetZoneCommand extends AbstractZoneMakerCommand {
}
this.msg("Reloading warzone " + zone.getName() + ".");
if (zone.getLobby() != null) {
zone.getLobby().getVolume().resetBlocksAsJob();
}
zone.reinitialize();
return true;

View File

@ -134,9 +134,6 @@ public class SetTeamConfigCommand extends AbstractZoneMakerCommand {
if (!namedParamReturn.equals("") && !namedParamReturn.equals("PARSE-ERROR")) {
WarzoneYmlMapper.save(zone, false);
if (zone.getLobby() != null) {
zone.getLobby().getVolume().resetBlocks();
}
String zoneReset = "Some changes may require a /resetzone. ";
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.RESETONCONFIGCHANGE)) {

View File

@ -95,9 +95,6 @@ public class SetZoneConfigCommand extends AbstractZoneMakerCommand {
if (!namedParamReturn.equals("") && !namedParamReturn.equals("PARSE-ERROR")) {
WarzoneYmlMapper.save(zone, false);
if (zone.getLobby() != null) {
zone.getLobby().getVolume().resetBlocks();
}
String zoneReset = "Some changes may require a /resetzone. ";
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.RESETONCONFIGCHANGE)) {