mirror of
https://github.com/taoneill/war.git
synced 2025-02-23 06:41:20 +01:00
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:
parent
2c773710ba
commit
305b2454c7
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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)) {
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user