From fd4a5f2aaac52461b5e8d252a381e49720b64d3b Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 23 Jan 2019 13:34:23 +0000 Subject: [PATCH] Fix item despawning on plots --- .../intellectualsites/plotsquared/bukkit/BukkitMain.java | 3 ++- .../plotsquared/bukkit/listeners/EntitySpawnListener.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java index ae95bd371..e2eb005c2 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java @@ -431,7 +431,8 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain case FIREBALL: case DRAGON_FIREBALL: case DROPPED_ITEM: - if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { + if (Settings.Enabled_Components.KILL_ROAD_ITEMS + && BukkitUtil.getPlot(entity.getLocation()) == null) { entity.remove(); } // dropped item diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/EntitySpawnListener.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/EntitySpawnListener.java index 9f787297d..443e07025 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/EntitySpawnListener.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/EntitySpawnListener.java @@ -75,6 +75,7 @@ import java.util.List; switch (type) { case DROPPED_ITEM: if (Settings.Enabled_Components.KILL_ROAD_ITEMS) { + event.setCancelled(true); break; } case PLAYER: