Package me.manossef.api.wrappers
Class CustomEnchantment
java.lang.Object
me.manossef.api.wrappers.CustomEnchantment
This class contains the methods that register the custom enchantments to
Enchantment.
Plugins can construct custom enchantments using the EnchantmentWrapper class and then register them using the register(Enchantment) method.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidregister(org.bukkit.enchantments.Enchantment ench)Collects all values ofEnchantmentto a list and checks if the provided enchantment is part of that list, registering it if not.protected static voidregisterEnchantment(org.bukkit.enchantments.Enchantment ench)Registers the enchantment specified in theregister(Enchantment)method toEnchantment.
-
Constructor Details
-
CustomEnchantment
public CustomEnchantment()
-
-
Method Details
-
register
public static void register(org.bukkit.enchantments.Enchantment ench)Collects all values ofEnchantmentto a list and checks if the provided enchantment is part of that list, registering it if not.- Parameters:
ench- the enchantment to check for.
-
registerEnchantment
protected static void registerEnchantment(org.bukkit.enchantments.Enchantment ench)Registers the enchantment specified in theregister(Enchantment)method toEnchantment. Internal use only. Useregister(Enchantment).- Parameters:
ench- always the same as the parameter in theregister(Enchantment)method.
-