diff --git a/Essentials/src/main/java/com/earth2me/essentials/Enchantments.java b/Essentials/src/main/java/com/earth2me/essentials/Enchantments.java index f4f12e97d..4fc84b282 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/Enchantments.java +++ b/Essentials/src/main/java/com/earth2me/essentials/Enchantments.java @@ -301,4 +301,20 @@ public final class Enchantments { public static Set keySet() { return ENCHANTMENTS.keySet(); } + + public static void registerEnchantment(String name, Enchantment enchantment) { + if (ENCHANTMENTS.containsKey(name) || ALIASENCHANTMENTS.containsKey(name)) { + return; + } + + ENCHANTMENTS.put(name, enchantment); + } + + public static void registerAlias(String name, Enchantment enchantment) { + if (ENCHANTMENTS.containsKey(name) || ALIASENCHANTMENTS.containsKey(name) || !ENCHANTMENTS.containsValue(enchantment)) { + return; + } + + ALIASENCHANTMENTS.put(name, enchantment); + } }