Partially implemented specific unlock databases

This commit is contained in:
Anuken
2018-09-28 14:17:44 -04:00
parent 24decf8abc
commit 967998273f
4 changed files with 115 additions and 43 deletions

View File

@@ -31,6 +31,7 @@ public class Net{
private static boolean server;
private static boolean active;
private static boolean clientLoaded;
private static String lastIP;
private static Array<Object> packetQueue = new Array<>();
private static ObjectMap<Class<?>, Consumer> clientListeners = new ObjectMap<>();
private static ObjectMap<Class<?>, BiConsumer<Integer, Object>> serverListeners = new ObjectMap<>();
@@ -79,6 +80,7 @@ public class Net{
* Connect to an address.
*/
public static void connect(String ip, int port) throws IOException{
lastIP = ip + ":" + port;
if(!active){
clientProvider.connect(ip, port);
active = true;
@@ -88,6 +90,11 @@ public class Net{
}
}
/**Returns the last IP connected to.*/
public static String getLastIP() {
return lastIP;
}
/**
* Host a server at an address.
*/