Fixed bugs with desynced block events

This commit is contained in:
Anuken
2018-02-03 23:27:01 -05:00
parent 2ba38c2ee3
commit 8f31d19e90
6 changed files with 25 additions and 8 deletions

View File

@@ -65,11 +65,15 @@ public class Net{
/**Connect to an address.*/
public static void connect(String ip, int port) throws IOException{
clientProvider.connect(ip, port);
active = true;
server = false;
if(!active) {
clientProvider.connect(ip, port);
active = true;
server = false;
Timers.runTask(60f, Platform.instance::updateRPC);
Timers.runTask(60f, Platform.instance::updateRPC);
}else{
throw new IOException("Already connected!");
}
}
/**Host a server at an address*/