From 3173b68bbe223ba483e77e53787d98bbb380a475 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Sun, 29 Jan 2012 13:37:32 +0100 Subject: [PATCH] Filter null/AIR from items dropped on death. Fixes: BUKKIT-653 --- .../java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index db45fb60cc..f1e300744b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/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); }