From 89318be5f497ed977969579e3ab5048882270a36 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Tue, 29 Sep 2020 15:53:23 +0100 Subject: [PATCH] Apply e2f9b4245b9f7168fc38d9cb10cd05efcb42fe05 to paper listener too --- .../plotsquared/bukkit/listener/PaperListener.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java index e3995d9df..9b676c7b4 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java @@ -221,19 +221,22 @@ public class PaperListener implements Listener { } Plot plot = location.getOwnedPlotAbs(); if (plot == null) { + EntityType type = event.getType(); if (!area.isMobSpawning()) { - EntityType type = event.getType(); switch (type) { case DROPPED_ITEM: if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { - event.setShouldAbortSpawn(true); event.setCancelled(true); - break; + return; } case PLAYER: return; } - event.setShouldAbortSpawn(true); + if (type.isAlive()) { + event.setCancelled(true); + } + } + if (!area.isMiscSpawnUnowned() && !type.isAlive()) { event.setCancelled(true); } return;