Registering Enchantments
In order for your enchantments to work, you must register them. This is done very simply. First, make your plugin extend EnchantPlugin instead of JavaPlugin (EnchantPlugin extends JavaPlugin so you don't need to change anything)
public class ExamplePlugin extends EnchantPlugin
Now the only thing left to do is override the registerEnchantments() method and use the EnchantmentAPI.registerCustomEnchantment(CustomEnchantment) method on each of your enchantments.
@Override public void registerEnchantments() { EnchantmentAPI.registerCustomEnchantment(new LifestealEnchantment()); }
If you ever want to unregister one or more of your enchantments (if you want to clear them on onDisable() or to just stop their effects from happening for awhile), simply use the static method:
EnchantmentAPI.unregisterCustomEnchantment(String enchantName);
And that's it! Once registered, your enchantments will be able to apply their effects and result from enchantment table usage!
dont understand where and what do you change help now pls
the info doesnt help allot it doesnt help
@aukeloosman
If you can't make heads or tails of this, you need to learn java. To me this looks like a ridiculously easy registering system. Nice job @Eniripsa96