mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-25 05:51:47 -08:00
Fixed server port not being parsed
This commit is contained in:
parent
e0f59404c1
commit
60d83751e8
1 changed files with 7 additions and 1 deletions
|
|
@ -288,7 +288,13 @@ public class JoinDialog extends FloatingDialog{
|
|||
local.table(Tex.button, t -> t.label(() -> "[accent]" + Core.bundle.get("hosts.discovering.any") + Strings.animated(Time.time(), 4, 10f, ".")).pad(10f)).growX();
|
||||
net.discoverServers(this::addLocalHost, this::finishLocalHosts);
|
||||
for(String host : defaultServers){
|
||||
net.pingHost(host, port, this::addLocalHost, e -> {});
|
||||
String address = host;
|
||||
int p = port;
|
||||
if(host.contains(":")){
|
||||
address = host.split(":")[0];
|
||||
p = Strings.parseInt(host.split(":")[1]);
|
||||
}
|
||||
net.pingHost(address, p, this::addLocalHost, e -> {});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue