Attempt to fix PC-1184 with Stream.distinct

This commit is contained in:
ArcticZeroo 2017-10-21 21:01:27 -04:00 committed by Alexander Meech
parent 9d343a8556
commit 051223ddf0

View File

@ -1521,7 +1521,11 @@ public abstract class Game extends ListenerComponent implements Lifetimed
List<Player> teamList = new ArrayList<>();
List<Player> otherList = new ArrayList<>();
teamList.addAll(team.GetPlacements(true));
otherList.addAll(UtilServer.getPlayersCollection().stream().filter((p) -> !getArcadeManager().isVanished(p)).collect(Collectors.toList()));
otherList.addAll(UtilServer.getPlayersCollection()
.stream()
.distinct()
.filter((p) -> !getArcadeManager().isVanished(p))
.collect(Collectors.toList()));
otherList.removeAll(teamList);
Player player = teamList.remove(0);
WinEffectManager.prePlay(this, player, teamList, otherList);