diff --git a/com/Acrobot/Breeze/Utils/MaterialUtil.java b/com/Acrobot/Breeze/Utils/MaterialUtil.java index 47e8ddf..615ab0d 100644 --- a/com/Acrobot/Breeze/Utils/MaterialUtil.java +++ b/com/Acrobot/Breeze/Utils/MaterialUtil.java @@ -182,7 +182,11 @@ public class MaterialUtil { Map enchantments = getEnchantments(itemName); if (!enchantments.isEmpty()) { - itemStack.addEnchantments(enchantments); + try { + itemStack.addEnchantments(enchantments); + } catch (IllegalArgumentException exception) { + //Do nothing, because the enchantment can't be applied + } } return itemStack; @@ -237,7 +241,7 @@ public class MaterialUtil { * @return Enchantments found */ public static Map getEnchantments(String base32) { - if (base32 == null) { + if (base32 == null || base32.isEmpty()) { return new HashMap(); }