소스 검색

Apparently our ItemStack can be null here.

GJ 12 년 전
부모
커밋
862f5d73e1
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/main/java/com/gmail/nossr50/util/Misc.java

+ 2 - 1
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);