Server to server (#855)
* Update NetClient.java * Update NetClient.java * Update NetClient.java
This commit is contained in:
@@ -198,6 +198,16 @@ public class NetClient implements ApplicationListener{
|
|||||||
return "[#" + player.color.toString().toUpperCase() + "]" + name;
|
return "[#" + player.color.toString().toUpperCase() + "]" + name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Remote(called = Loc.client, variants = Variant.one)
|
||||||
|
public static void onConnect(String ip, int port){
|
||||||
|
netClient.disconnectQuietly();
|
||||||
|
state.set(State.menu);
|
||||||
|
logic.reset();
|
||||||
|
|
||||||
|
Vars.netClient.beginConnecting();
|
||||||
|
net.connect(ip, port, () -> {});
|
||||||
|
}
|
||||||
|
|
||||||
@Remote(targets = Loc.client)
|
@Remote(targets = Loc.client)
|
||||||
public static void onPing(Player player, long time){
|
public static void onPing(Player player, long time){
|
||||||
Call.onPingResponse(player.con, time);
|
Call.onPingResponse(player.con, time);
|
||||||
|
|||||||
Reference in New Issue
Block a user