From 62fac61c4da31a3c6403a2a9d152851cd9ce4180 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Mon, 8 Aug 2022 19:23:10 +0200 Subject: [PATCH] fix: handling of item despawning on road --- .../plotsquared/bukkit/listener/EntitySpawnListener.java | 6 ++++++ 1 file changed, 6 insertions(+) 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..caad6393c 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntitySpawnListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/EntitySpawnListener.java @@ -140,6 +140,12 @@ public class EntitySpawnListener implements Listener { event.setCancelled(true); } } + if (type == EntityType.DROPPED_ITEM) { + if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { + event.setCancelled(true); + } + return; + } if (!area.isMiscSpawnUnowned() && !type.isAlive()) { event.setCancelled(true); }