mirror of
https://github.com/taoneill/war.git
synced 2024-11-13 05:54:31 +01:00
Prevent players from leaving spawn while zone is resetting.
- Closes #738
This commit is contained in:
parent
0c9ed4b238
commit
7ee243e20d
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user