From 862f5d73e139cfec98a77fa785e30be6364736b8 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 1 Feb 2013 14:58:03 -0500 Subject: [PATCH] Apparently our ItemStack can be null here. --- src/main/java/com/gmail/nossr50/util/Misc.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index 05ad642e1..5ddef3e17 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -344,8 +344,9 @@ public final class Misc { */ public static void dropItem(Location location, ItemStack itemStack) { - if(itemStack.getType() == Material.AIR) + if (itemStack.getType() != null || itemStack.getType() == Material.AIR) { return; + } // We can't get the item until we spawn it and we want to make it cancellable, so we have a custom event. McMMOItemSpawnEvent event = new McMMOItemSpawnEvent(location, itemStack);