Browse Source

real ip fix 3

master
gsd 9 months ago
parent
commit
19861ae58c
  1. 10
      src/main/java/app/entities/server/Server.java

10
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();
}
}

Loading…
Cancel
Save