Fix respawn task console errors

This commit is contained in:
Daniel Saukel 2016-05-15 19:31:34 +02:00
parent f01a4411a5
commit 1f2791792b

View File

@ -38,10 +38,8 @@ public class RespawnTask extends BukkitRunnable {
@Override
public void run() {
if (player.getWorld() == location.getWorld()) {
if (player.getLocation().distance(location) > 2) {
PlayerUtil.secureTeleport(player, location);
}
if (player.getWorld() != location.getWorld() || player.getLocation().distance(location) > 2) {
PlayerUtil.secureTeleport(player, location);
}
DGlobalPlayer dPlayer = DungeonsXL.getInstance().getDPlayers().getByPlayer(player);