Properly detect enchantments with improper names (#3900)

This commit is contained in:
vk2gpz 2021-01-10 07:26:07 +11:00 committed by GitHub
parent eae8bc05c9
commit 817585a9a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -285,6 +285,12 @@ public final class Enchantments {
if (enchantment == null) {
enchantment = Enchantment.getByName(name.toUpperCase());
}
if (enchantment == null) {
enchantment = Enchantment.getByName(name.toLowerCase());
}
if (enchantment == null) {
enchantment = Enchantment.getByName(name);
}
if (enchantment == null) {
enchantment = ENCHANTMENTS.get(name.toLowerCase(Locale.ENGLISH));
}