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 fcd40db40..483484031 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -203,7 +203,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi plotEntry(player, plot); } - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) public static void PlayerMove(final PlayerMoveEvent event) { final Location f = BukkitUtil.getLocation(event.getFrom()); final Location t = BukkitUtil.getLocation(event.getTo()); @@ -252,7 +252,8 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi if (!plot.equals(getCurrentPlot(f))) { plotEntry(player, plot); } - } else if (leftPlot(f, t)) { + } + else if (leftPlot(f, t)) { plot = getCurrentPlot(f); plotExit(player, plot); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/TNTListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/TNTListener.java index 07e5ff535..768d235f0 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/TNTListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/TNTListener.java @@ -29,6 +29,9 @@ public class TNTListener implements Listener { @EventHandler public void onExplode(EntityExplodeEvent event) { Entity entity = event.getEntity(); + if (entity == null) { + return; + } World world = entity.getWorld(); String worldname = world.getName(); if (!PlotSquared.isPlotWorld(worldname)) {