diff --git a/ChestCommands/src/com/gmail/filoghost/chestcommands/serializer/EnchantmentSerializer.java b/ChestCommands/src/com/gmail/filoghost/chestcommands/serializer/EnchantmentSerializer.java index c579a26..edf2775 100644 --- a/ChestCommands/src/com/gmail/filoghost/chestcommands/serializer/EnchantmentSerializer.java +++ b/ChestCommands/src/com/gmail/filoghost/chestcommands/serializer/EnchantmentSerializer.java @@ -40,7 +40,7 @@ public class EnchantmentSerializer { for (Enchantment enchant : Enchantment.values()) { if (enchant != null) { // Accepts the ugly default names too. - enchantmentsMap.put(formatLowercase(enchant.toString()), enchant); + enchantmentsMap.put(formatLowercase(enchant.getName()), enchant); } } } @@ -71,7 +71,7 @@ public class EnchantmentSerializer { singleEnchant = levelSplit[0]; } - Enchantment ench = matchEnchantment(input); + Enchantment ench = matchEnchantment(singleEnchant); if (ench == null) { errorLogger.addError("The icon \"" + iconName + "\" in the menu \"" + menuFileName + "\" has an invalid enchantment: " + singleEnchant); @@ -91,8 +91,4 @@ public class EnchantmentSerializer { return enchantmentsMap.get(formatLowercase(input)); } - public static String saveToString() { - return ""; - } - }