forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -49,9 +49,9 @@ public class Fightserver {
|
||||
Instant timeout = Instant.now().minus(5, ChronoUnit.SECONDS);
|
||||
|
||||
Iterator<Map.Entry<String, Fightserver>> it = servers.entrySet().iterator();
|
||||
while(it.hasNext()) {
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<String, Fightserver> server = it.next();
|
||||
if(timeout.isAfter(server.getValue().lastUpdate)) {
|
||||
if (timeout.isAfter(server.getValue().lastUpdate)) {
|
||||
server.getValue().remove();
|
||||
it.remove();
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class Fightserver {
|
||||
|
||||
private void setupPortal(String gameMode) {
|
||||
FightserverPortal portal = FightserverPortal.findFree(gameMode);
|
||||
if(portal == null)
|
||||
if (portal == null)
|
||||
return;
|
||||
|
||||
portals.add(portal);
|
||||
@@ -107,7 +107,7 @@ public class Fightserver {
|
||||
}
|
||||
|
||||
private <T> void update(T old, T current, Consumer<FightserverPortal> observer) {
|
||||
if(!old.equals(current))
|
||||
if (!old.equals(current))
|
||||
portals.forEach(observer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user