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 a497ad33..a5d2e2f8 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/task/RespawnTask.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/task/RespawnTask.java @@ -38,8 +38,10 @@ public class RespawnTask extends BukkitRunnable { @Override public void run() { - if (player.getLocation().distance(location) > 2) { - PlayerUtil.secureTeleport(player, location); + if (player.getWorld() == location.getWorld()) { + if (player.getLocation().distance(location) > 2) { + PlayerUtil.secureTeleport(player, location); + } } DGlobalPlayer dPlayer = DungeonsXL.getInstance().getDPlayers().getByPlayer(player);