add my_zone cmd
All checks were successful
/ Auto-Build-App (push) Successful in 1m31s

This commit is contained in:
pietru 2024-10-11 14:44:41 +02:00
parent ed07f7955c
commit a01fc77e2b

View file

@ -36,6 +36,15 @@ public class TextCommands {
packet.playerUniqueId=account.getUniqueId();
packet.setupAndSend(channelHandlerContext);
});
commands.put("my_zone",(args, networkIdentity, channelHandlerContext) -> {
Player player = ServerSingletons.getPlayer(networkIdentity);
Account account = ServerSingletons.getAccount(networkIdentity);
Vector3 pos = player.getPosition();
MessagePacket packet = new MessagePacket("You are in "+player.zoneId);
packet.playerUniqueId=account.getUniqueId();
packet.setupAndSend(channelHandlerContext);
});
commands.put("reload_regions",(args, networkIdentity, channelHandlerContext) -> {
reload_regions();
Account account = ServerSingletons.getAccount(networkIdentity);