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;
|
int radius = Settings.getMovementRadius;
|
||||||
Location spawn = plugin.getSpawnLocation(player);
|
Location spawn = plugin.getSpawnLocation(player);
|
||||||
|
|
||||||
if (spawn != null && spawn.getWorld() != null)
|
if (spawn != null && spawn.getWorld() != null) {
|
||||||
if (!event.getPlayer().getWorld().equals(spawn.getWorld())) {
|
if (!event.getPlayer().getWorld().equals(spawn.getWorld())) {
|
||||||
event.getPlayer().teleport(spawn);
|
event.getPlayer().teleport(spawn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((spawn.distance(player.getLocation()) > radius) && spawn.getWorld() != null) {
|
if ((spawn.distance(player.getLocation()) > radius)) {
|
||||||
event.getPlayer().teleport(spawn);
|
event.getPlayer().teleport(spawn);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user