Minor assignment tweak

This commit is contained in:
Anuken
2020-02-22 19:53:14 -05:00
parent 501e909039
commit c8a762df42
2 changed files with 3 additions and 1 deletions

View File

@@ -48,6 +48,8 @@ public class NetServer implements ApplicationListener{
if(state.rules.pvp){
//find team with minimum amount of players and auto-assign player to that.
TeamData re = state.teams.getActive().min(data -> {
if(state.rules.waveTeam == data.team || !data.team.active()) return Integer.MAX_VALUE;
int count = 0;
for(Player other : players){
if(other.getTeam() == data.team && other != player){