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