diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java index 4970ff199d..9c47dee48c 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -137,13 +137,13 @@ private static String generateName(net.minecraft.enchantment.Enchantment target) if (StringUtils.containsIgnoreCase(candidate, "Enchantment")) { candidate = candidate.replaceFirst("[E|e]nchantment", ""); // Add underscores at camelCase humps - candidate = candidate.replaceAll("([a-z])([A-Z])", "\1_\2").toUpperCase(); + candidate = candidate.replaceAll("([a-z])([A-Z])", "$1_$2").toUpperCase(); candidate = addSuffix(candidate.toUpperCase()); return candidate; } // fall back to the FQN if naming pattern is broken candidate = clz.getName(); - candidate = candidate.replaceAll("([a-z])([A-Z])", "\1_\2"); + candidate = candidate.replaceAll("([a-z])([A-Z])", "$1_$2"); candidate = candidate.replaceAll("\\.", "_"); candidate = addSuffix(candidate.toUpperCase()); return candidate;