diff --git a/src/main/java/app/entities/server/Server.java b/src/main/java/app/entities/server/Server.java index 35461c0..af1315b 100644 --- a/src/main/java/app/entities/server/Server.java +++ b/src/main/java/app/entities/server/Server.java @@ -137,4 +137,14 @@ public class Server extends ExternalValveClient { public SteamID searchPlayer(String player_nickname){ return players.stream().filter(player -> player.getName().equals(player_nickname)).map(player -> player.getSteam()).findFirst().orElse(null); } + + public void setIp(String ip) { + String port; + try { + port = getAddress().split(":")[1]; + } catch (Exception e) { + port = ""; + } + this.ip = new StringBuilder().append(ip).append(":").append(port).toString(); + } }