Filter null/AIR from items dropped on death. Fixes: BUKKIT-653

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
CraftBukkit/Spigot 2012-01-29 13:37:32 +01:00
parent ef756d8eba
commit 5695803314

View file

@ -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);
}