SteamWar/BungeeCore
Archiviert
13
2

Update some stuff

Dieser Commit ist enthalten in:
yoyosource 2022-04-06 17:01:33 +02:00
Ursprung 9a0b3a41b9
Commit 169d26852c

Datei anzeigen

@ -129,9 +129,16 @@ public class FightEndsHandler implements SpigotHandler {
if (!gameModeGames.containsKey(gameMode)) {
return false;
}
List<Game> games = gameModeGames.get(gameMode);
LinkedList<Game> games = gameModeGames.get(gameMode);
long lifetime = fightRanges.getOrDefault(gameMode, defaultFightRange);
games.removeIf(game -> game.livedMillis() > lifetime);
while (!games.isEmpty()) {
Game game = games.getFirst();
if (game.livedMillis() > lifetime) {
games.removeFirst();
} else {
break;
}
}
return games.stream().filter(game -> game.isSame(bluePlayers, redPlayers)).count() > fightCounts.getOrDefault(gameMode, defaultFightCount);
}