Ranked #333
@ -31,6 +31,7 @@ import java.time.Instant;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class FightEndsHandler implements SpigotHandler {
|
||||
@ -38,6 +39,7 @@ public class FightEndsHandler implements SpigotHandler {
|
||||
private int K = 20;
|
||||
private long defaultFightRange = 1000 /* Milliseconds */ * 60 /* Seconds */ * 15L /* Minutes */;
|
||||
private Map<String, Long> fightRanges = new HashMap<>();
|
||||
|
||||
{
|
||||
fightRanges.put("miniwargear", 1000 /* Milliseconds */ * 60 /* Seconds */ * 10L /* Minutes */);
|
||||
}
|
||||
@ -73,6 +75,13 @@ public class FightEndsHandler implements SpigotHandler {
|
||||
blueResult = 0;
|
||||
}
|
||||
YoyoNow markierte diese Unterhaltung als gelöst
Veraltet
|
||||
|
||||
Set<Integer> teamsIds = fightEndsPacket.getBluePlayers().stream().map(SteamwarUser::get).map(SteamwarUser::getTeam).collect(Collectors.toSet());
|
||||
for (int redPlayer : fightEndsPacket.getRedPlayers()) {
|
||||
if (teamsIds.contains(SteamwarUser.get(redPlayer).getTeam())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (teamComboExistedAlready(fightEndsPacket.getBluePlayers(), fightEndsPacket.getRedPlayers(), fightEndsPacket.getGameMode())) {
|
||||
return;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Hier wäre ein Kommentar darüber, was die kommenden Zeilen genau filtern, evtl. noch ganz nett.