From f16bd2908c911a3c1b337a17dac693766975839c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wert=C3=ADk?= Date: Sun, 29 Mar 2020 00:47:24 +0100 Subject: [PATCH] Most likely fixed no.9 - Teleport bug. --- src/main/java/com/songoda/skyblock/listeners/Move.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/songoda/skyblock/listeners/Move.java b/src/main/java/com/songoda/skyblock/listeners/Move.java index 05f2d937..6c84bc23 100644 --- a/src/main/java/com/songoda/skyblock/listeners/Move.java +++ b/src/main/java/com/songoda/skyblock/listeners/Move.java @@ -208,8 +208,10 @@ public class Move implements Listener { final Player player = e.getPlayer(); final WorldManager worldManager = skyblock.getWorldManager(); - if (!worldManager.isIslandWorld(e.getTo().getWorld())) return; - if (skyblock.getIslandManager().getIslandAtLocation(e.getTo()) != null) return; + if (e.getTo() == null || + !worldManager.isIslandWorld(e.getTo().getWorld()) || + skyblock.getIslandManager().getIslandAtLocation(e.getTo()) != null) + return; e.setCancelled(true);