diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntitySpawnListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntitySpawnListener.java index 77d694379..841f52970 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntitySpawnListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntitySpawnListener.java @@ -126,16 +126,16 @@ public class EntitySpawnListener implements Listener { Plot plot = location.getOwnedPlotAbs(); EntityType type = entity.getType(); if (plot == null) { + if (type == EntityType.DROPPED_ITEM) { + if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { + event.setCancelled(true); + } + return; + } if (!area.isMobSpawning()) { if (type == EntityType.PLAYER) { return; } - if (type == EntityType.DROPPED_ITEM) { - if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { - event.setCancelled(true); - } - return; - } if (type.isAlive()) { event.setCancelled(true); } 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 a2609fb23..9e3d9ba8e 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java @@ -229,17 +229,17 @@ public class PaperListener implements Listener { Plot plot = location.getOwnedPlotAbs(); if (plot == null) { EntityType type = event.getType(); + // PreCreatureSpawnEvent **should** not be called for DROPPED_ITEM, just for the sake of consistency + if (type == EntityType.DROPPED_ITEM) { + if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { + event.setCancelled(true); + } + return; + } if (!area.isMobSpawning()) { if (type == EntityType.PLAYER) { return; } - if (type == EntityType.DROPPED_ITEM) { - if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { - event.setShouldAbortSpawn(true); - event.setCancelled(true); - } - return; - } if (type.isAlive()) { event.setShouldAbortSpawn(true); event.setCancelled(true);