Update some stuff
Dieser Commit ist enthalten in:
Ursprung
9a0b3a41b9
Commit
169d26852c
@ -129,9 +129,16 @@ public class FightEndsHandler implements SpigotHandler {
|
|||||||
if (!gameModeGames.containsKey(gameMode)) {
|
if (!gameModeGames.containsKey(gameMode)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
List<Game> games = gameModeGames.get(gameMode);
|
LinkedList<Game> games = gameModeGames.get(gameMode);
|
||||||
long lifetime = fightRanges.getOrDefault(gameMode, defaultFightRange);
|
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);
|
return games.stream().filter(game -> game.isSame(bluePlayers, redPlayers)).count() > fightCounts.getOrDefault(gameMode, defaultFightCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren