Make enchantments case insensitive.

Lowercasing the enchantment string before feeding it to the Bukkit API makes the enchantments a little more "copy/paste proof" when grabbing the uppercased names from the JavaDocs/Minecraft wiki.
This commit is contained in:
Andreas Troelsen committed 2018-12-31 14:40:54 +01:00
1 parent 5e7cb2a82b
commit 74a7388701
2 files changed
+2 -1

No files matched your search

@@ -160,6 +160,6 @@ public class ItemParser
}
private static Enchantment getEnchantment(String ench) {
return Enchantment.getByKey(NamespacedKey.minecraft(ench));
return Enchantment.getByKey(NamespacedKey.minecraft(ench.toLowerCase()));
}
}