From 93414d54c1f6ae2291ea3788ba43edfbe7b98473 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 30 Nov 2016 15:41:08 +1100 Subject: [PATCH] Fixes #1453 --- .../bukkit/listeners/EntitySpawnListener.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/EntitySpawnListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/EntitySpawnListener.java index e693716fe..a7ee97166 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/EntitySpawnListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/EntitySpawnListener.java @@ -23,6 +23,9 @@ public class EntitySpawnListener implements Listener { } Plot plot = area.getOwnedPlotAbs(location); if (plot == null) { + if (!area.MOB_SPAWNING) { + event.setCancelled(true); + } return; } if (Settings.Done.RESTRICT_BUILDING && plot.hasFlag(Flags.DONE)) { @@ -30,12 +33,6 @@ public class EntitySpawnListener implements Listener { } switch (entity.getType()) { case ENDER_CRYSTAL: - if (plot == null) { - if (!area.MOB_SPAWNING) { - event.setCancelled(true); - } - return; - } if (PlayerEvents.checkEntity(entity, plot)) { event.setCancelled(true); }