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
2018-12-31 14:40:54 +01:00
parent 5e7cb2a82b
commit 74a7388701
2 changed files with 2 additions and 1 deletions
@@ -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()));
}
}