Message to the player when the mobile phone connection is terminated

master
Alex 2022-03-13 21:19:17 +01:00
parent 33c3fbc185
commit a0de144a3a
1 changed files with 5 additions and 2 deletions

View File

@ -163,11 +163,14 @@ public class SocketClientMessageListener implements KraSocketClientEventInterfac
}
case 64247: // mobile connection closed
ProxyServer.getInstance().getScheduler().runAsync(ProxySystem.getInstance(), () -> {
ProxyServer.getInstance().getLogger()
.info("mobile connection closed " + kraProtocolMessage.getUuid());
ProxiedPlayer proxiedPlayer = ProxySystem.getInstance().getProxy()
.getPlayer(kraProtocolMessage.getUuid());
ProxyServer.getInstance().getLogger()
.info("mobile connection closed " + kraProtocolMessage.getUuid() + "player "
+ proxiedPlayer);
if (proxiedPlayer != null) {
proxiedPlayer.sendMessage(new TextComponent("§5Mobile §8» §cConnection lost!"));
}