Move this function here :')

This commit is contained in:
Xephi59 2015-07-09 00:42:52 +02:00
parent 88eb1048f6
commit 5364678931

View File

@ -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;
}
}
}