discovery
This commit is contained in:
@@ -85,6 +85,7 @@ public class NetServer implements ApplicationListener{
|
||||
String uuid = packet.uuid;
|
||||
|
||||
NetConnection connection = Net.getConnection(id);
|
||||
Log.info("\n\nGET CONNECT\n\n");
|
||||
|
||||
if(connection == null ||
|
||||
admins.isIPBanned(connection.address)) return;
|
||||
@@ -138,8 +139,6 @@ public class NetServer implements ApplicationListener{
|
||||
return;
|
||||
}
|
||||
|
||||
Log.debug("Recieved connect packet for player '{0}' / UUID {1} / IP {2}", packet.name, uuid, connection.address);
|
||||
|
||||
String ip = Net.getConnection(id).address;
|
||||
|
||||
admins.updatePlayerJoined(uuid, ip, packet.name);
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.anuke.annotations.Annotations.*;
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.collection.*;
|
||||
import io.anuke.arc.graphics.*;
|
||||
import io.anuke.arc.input.*;
|
||||
import io.anuke.arc.math.*;
|
||||
import io.anuke.arc.scene.style.*;
|
||||
import io.anuke.arc.scene.ui.*;
|
||||
@@ -77,6 +78,11 @@ public class JoinDialog extends FloatingDialog{
|
||||
}
|
||||
});
|
||||
|
||||
keyDown(KeyCode.F5, () -> {
|
||||
refreshLocal();
|
||||
refreshRemote();
|
||||
});
|
||||
|
||||
shown(() -> {
|
||||
setup();
|
||||
refreshLocal();
|
||||
@@ -267,7 +273,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
|
||||
local.clear();
|
||||
local.background((Drawable)null);
|
||||
local.table("button", t -> t.label(() -> "[accent]" + Core.bundle.get("hosts.discovering") + Strings.animated(Time.time(), 4, 10f, ".")).pad(10f)).growX();
|
||||
local.table("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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user