ClientServerConnectEvent (#8309)
This commit is contained in:
@@ -5,6 +5,7 @@ import arc.func.*;
|
||||
import arc.net.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.net.Packets.*;
|
||||
import mindustry.net.Streamable.*;
|
||||
@@ -154,6 +155,7 @@ public class Net{
|
||||
public void connect(String ip, int port, Runnable success){
|
||||
try{
|
||||
if(!active){
|
||||
Events.fire(new ClientServerConnectEvent(ip, port));
|
||||
provider.connectClient(ip, port, success);
|
||||
active = true;
|
||||
server = false;
|
||||
|
||||
Reference in New Issue
Block a user