From 5695803314ed1aaaf634cd0fee52ebd756c4a327 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 29 Jan 2012 13:37:32 +0100 Subject: [PATCH] Filter null/AIR from items dropped on death. Fixes: BUKKIT-653 By: Erik Broes --- .../java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index db45fb60cc..f1e300744b 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -377,6 +377,8 @@ public class CraftEventFactory { victim.newExp = event.getNewExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { + if (stack == null || stack.getType() == Material.AIR) continue; + world.dropItemNaturally(entity.getLocation(), stack); }