mirror of
https://github.com/taoneill/war.git
synced 2024-11-13 05:54:31 +01:00
Check minplayers/teams only upon respawn.
Closes gh-496. New can't-re-enter-spawn protection was conflicting with the minplayers/minteams check that used to bring back everyone to spawn as soon as the limit was hit. From now on, you will only be stopped from exiting the spawn after your next death. This is how it probably should have been implemented from the start - much less brutal when a player leaves the match suddenly. :)
This commit is contained in:
parent
9139f9df45
commit
06d6ae9bdb
@ -439,7 +439,9 @@ public class WarPlayerListener implements Listener {
|
||||
LoadoutSelection loadoutSelectionState = playerWarzone.getLoadoutSelections().get(player.getName());
|
||||
FlagReturn flagReturn = playerTeam.getTeamConfig().resolveFlagReturn();
|
||||
if (!playerTeam.getSpawnVolume().contains(playerLoc)) {
|
||||
if (!playerWarzone.isEnoughPlayers()) {
|
||||
if (!playerWarzone.isEnoughPlayers() && loadoutSelectionState != null && loadoutSelectionState.isStillInSpawn()) {
|
||||
// Be sure to keep only players that just respawned locked inside the spawn for minplayer/minteams restrictions - otherwise
|
||||
// this will conflict with the can't-renter-spawn bump just a few lines below
|
||||
War.war.badMsg(player, "Can't leave spawn until there's a minimum of " + playerWarzone.getWarzoneConfig().getInt(WarzoneConfig.MINPLAYERS)
|
||||
+" player(s) on at least " + playerWarzone.getWarzoneConfig().getInt(WarzoneConfig.MINTEAMS) + " team(s).");
|
||||
event.setTo(playerTeam.getTeamSpawn());
|
||||
|
Loading…
Reference in New Issue
Block a user