Fix enchantments.

This commit is contained in:
filoghost 2014-11-01 17:03:56 +01:00
parent c157724fc6
commit 4b67d888b4

View File

@ -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 "";
}
}