Browse Source

Check hasItemMeta

NuclearW 12 years ago
parent
commit
12709bcd7f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/main/java/com/gmail/nossr50/util/ItemUtils.java

+ 4 - 0
src/main/java/com/gmail/nossr50/util/ItemUtils.java

@@ -650,6 +650,10 @@ public class ItemUtils {
     }
 
     public static boolean isMcMMOItem(ItemStack is) {
+        if (!is.hasItemMeta()) {
+            return false;
+        }
+
         ItemMeta itemMeta = is.getItemMeta();
         if (itemMeta.hasLore()) {
             List<String> itemLore = itemMeta.getLore();