diff --git a/src/main/java/cc/fascinated/piaservers/pia/PiaManager.java b/src/main/java/cc/fascinated/piaservers/pia/PiaManager.java index ffb1c7f..4518f68 100644 --- a/src/main/java/cc/fascinated/piaservers/pia/PiaManager.java +++ b/src/main/java/cc/fascinated/piaservers/pia/PiaManager.java @@ -85,7 +85,8 @@ public class PiaManager { // Add the server to the list PiaServer server = new PiaServer(serverToken.getIp(), serverToken.getRegion(), new Date()); SERVERS.add(server); - if (!SERVERS.contains(server)) { + boolean newServer = SERVERS.stream().noneMatch(s -> s.getIp().equals(server.getIp())); + if (newServer) { newServers++; } }