mirror of
https://github.com/taoneill/war.git
synced 2024-09-30 07:27:27 +02: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)
|
// reset lobby (here be demons)
|
||||||
if (this.lobby != null) {
|
if (this.lobby != null) {
|
||||||
|
if (this.lobby.getVolume() != null) {
|
||||||
|
this.lobby.getVolume().resetBlocks();
|
||||||
|
}
|
||||||
this.lobby.initialize();
|
this.lobby.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -880,7 +883,7 @@ public class Warzone {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.handleScoreCapReached(player, winnersStr);
|
this.handleScoreCapReached(player, winnersStr);
|
||||||
// player.teleport(playerWarzone.getTeleport());
|
|
||||||
// player will die because it took too long :(
|
// player will die because it took too long :(
|
||||||
// we dont restore his inventory in handleScoreCapReached
|
// we dont restore his inventory in handleScoreCapReached
|
||||||
// check out PLAYER_MOVE for the rest of the fix
|
// check out PLAYER_MOVE for the rest of the fix
|
||||||
|
@ -78,9 +78,7 @@ public class RenameZoneCommand extends AbstractZoneMakerCommand {
|
|||||||
War.war.getWarzones().add(newZone);
|
War.war.getWarzones().add(newZone);
|
||||||
// zone.getVolume().loadCorners();
|
// zone.getVolume().loadCorners();
|
||||||
newZone.getVolume().loadCorners();
|
newZone.getVolume().loadCorners();
|
||||||
if (newZone.getLobby() != null) {
|
|
||||||
newZone.getLobby().getVolume().resetBlocks();
|
|
||||||
}
|
|
||||||
if (newZone.getWarzoneConfig().getBoolean(WarzoneConfig.RESETONLOAD)) {
|
if (newZone.getWarzoneConfig().getBoolean(WarzoneConfig.RESETONLOAD)) {
|
||||||
newZone.getVolume().resetBlocks();
|
newZone.getVolume().resetBlocks();
|
||||||
}
|
}
|
||||||
|
@ -54,9 +54,7 @@ public class ResetZoneCommand extends AbstractZoneMakerCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.msg("Reloading warzone " + zone.getName() + ".");
|
this.msg("Reloading warzone " + zone.getName() + ".");
|
||||||
if (zone.getLobby() != null) {
|
|
||||||
zone.getLobby().getVolume().resetBlocksAsJob();
|
|
||||||
}
|
|
||||||
zone.reinitialize();
|
zone.reinitialize();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -134,9 +134,6 @@ public class SetTeamConfigCommand extends AbstractZoneMakerCommand {
|
|||||||
if (!namedParamReturn.equals("") && !namedParamReturn.equals("PARSE-ERROR")) {
|
if (!namedParamReturn.equals("") && !namedParamReturn.equals("PARSE-ERROR")) {
|
||||||
|
|
||||||
WarzoneYmlMapper.save(zone, false);
|
WarzoneYmlMapper.save(zone, false);
|
||||||
if (zone.getLobby() != null) {
|
|
||||||
zone.getLobby().getVolume().resetBlocks();
|
|
||||||
}
|
|
||||||
|
|
||||||
String zoneReset = "Some changes may require a /resetzone. ";
|
String zoneReset = "Some changes may require a /resetzone. ";
|
||||||
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.RESETONCONFIGCHANGE)) {
|
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.RESETONCONFIGCHANGE)) {
|
||||||
|
@ -95,9 +95,6 @@ public class SetZoneConfigCommand extends AbstractZoneMakerCommand {
|
|||||||
if (!namedParamReturn.equals("") && !namedParamReturn.equals("PARSE-ERROR")) {
|
if (!namedParamReturn.equals("") && !namedParamReturn.equals("PARSE-ERROR")) {
|
||||||
|
|
||||||
WarzoneYmlMapper.save(zone, false);
|
WarzoneYmlMapper.save(zone, false);
|
||||||
if (zone.getLobby() != null) {
|
|
||||||
zone.getLobby().getVolume().resetBlocks();
|
|
||||||
}
|
|
||||||
|
|
||||||
String zoneReset = "Some changes may require a /resetzone. ";
|
String zoneReset = "Some changes may require a /resetzone. ";
|
||||||
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.RESETONCONFIGCHANGE)) {
|
if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.RESETONCONFIGCHANGE)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user