From 8a63b8937f31de7811a3ea1f1881752d058ad0d5 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Fri, 20 Mar 2015 21:16:39 +1100 Subject: [PATCH] fix portal NPE --- .../com/intellectualcrafters/plot/listeners/PlayerEvents.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index fa11227bc..8863e0b6b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -783,6 +783,9 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public static void onTeleport(final PlayerTeleportEvent event) { + if (event.getTo() == null || event.getFrom() == null) { + return; + } final Location f = BukkitUtil.getLocation(event.getFrom()); final Location t = BukkitUtil.getLocation(event.getTo()); final Location q = new Location(t.getWorld(), t.getX(), 64, t.getZ());