Prevent players from leaving spawn while zone is resetting.

- Closes #738
This commit is contained in:
taoneill 2014-01-12 22:16:36 -05:00
parent 0c9ed4b238
commit 7ee243e20d

View File

@ -500,6 +500,14 @@ public class WarPlayerListener implements Listener {
event.setTo(playerTeam.getRandomSpawn());
return;
}
if (playerWarzone.isReinitializing()) {
// don't let players wander about outside spawns during reset
// (they could mess up the blocks that have already been reset
// before the start of the new battle)
War.war.msg(player, "zone.battle.reset");
event.setTo(playerTeam.getRandomSpawn());
return;
}
} else if (loadoutSelectionState != null && !loadoutSelectionState.isStillInSpawn()
&& !playerWarzone.isCakeThief(player.getName())
&& (flagReturn.equals(FlagReturn.BOTH) || flagReturn.equals(FlagReturn.SPAWN))