From 1f2791792b6500516446debf81b70f81c1e0833f Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 15 May 2016 19:31:34 +0200 Subject: [PATCH] Fix respawn task console errors --- .../java/io/github/dre2n/dungeonsxl/task/RespawnTask.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/dre2n/dungeonsxl/task/RespawnTask.java b/src/main/java/io/github/dre2n/dungeonsxl/task/RespawnTask.java index a5d2e2f8..54c98c23 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/task/RespawnTask.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/task/RespawnTask.java @@ -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);