mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-03 01:00:18 +01:00
Move this function here :')
This commit is contained in:
parent
88eb1048f6
commit
5364678931
@ -354,14 +354,15 @@ public class AuthMePlayerListener implements Listener {
|
||||
int radius = Settings.getMovementRadius;
|
||||
Location spawn = plugin.getSpawnLocation(player);
|
||||
|
||||
if (spawn != null && spawn.getWorld() != null)
|
||||
if (spawn != null && spawn.getWorld() != null) {
|
||||
if (!event.getPlayer().getWorld().equals(spawn.getWorld())) {
|
||||
event.getPlayer().teleport(spawn);
|
||||
return;
|
||||
}
|
||||
if ((spawn.distance(player.getLocation()) > radius) && spawn.getWorld() != null) {
|
||||
event.getPlayer().teleport(spawn);
|
||||
return;
|
||||
if ((spawn.distance(player.getLocation()) > radius)) {
|
||||
event.getPlayer().teleport(spawn);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user