From e7657c7d076bf7aad306ddc1f33e6ed2d4397a17 Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Sat, 11 Jul 2020 19:52:20 -0500 Subject: [PATCH] Fix enchantments for servers that don't namespace them (Fixes #897) --- .../connector/network/translators/item/Enchantment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/item/Enchantment.java b/connector/src/main/java/org/geysermc/connector/network/translators/item/Enchantment.java index b9348e25f..ebdfe6506 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/item/Enchantment.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/item/Enchantment.java @@ -76,7 +76,7 @@ public enum Enchantment { public static Enchantment getByJavaIdentifier(String javaIdentifier) { for (Enchantment enchantment : Enchantment.values()) { - if (enchantment.javaIdentifier.equals(javaIdentifier)) { + if (enchantment.javaIdentifier.equals(javaIdentifier) || enchantment.name().toLowerCase(Locale.ENGLISH).equalsIgnoreCase(javaIdentifier)) { return enchantment; } }