Respawn plr if new loc after deny entrance is invalid
All checks were successful
/ Auto-Build-App (push) Successful in 1m39s

This commit is contained in:
pietru 2024-12-30 11:10:14 +01:00
parent e22fa77bd1
commit 2f57bc6a97

View file

@ -54,6 +54,8 @@ public class PlayerPositionMixin {
MessagePacket msg_packet = new MessagePacket("[Server] " + (is_not_reloading ? "Sorry, but you can't enter this area." : "Sorry but you can't do this action right now. [Config Reload In Progress]"));
msg_packet.setupAndSend(ctx);
if (!can_enter_position(plr_packet.position,"enter",playerUniqueId))
player.respawn(player.getZone());
}
}
}