Plugin API

Download API at: https://www.spigotmc.org/resources/advancedenchantments-api.76819/

AEAPI class functions:

Apply custom enchants

Applying custom enchants is simple. Do remember, that the AEAPI.applyEnchant method also returns a modified ItemStack, which you will need to override with your current ItemStack object.

Example:

ItemStack item = your item;
item = AEAPI.applyEnchant("enchantName", enchantLevel, item);

Listen to events

We run normal Bukkit extended events. You can listen to those like you do with any other event. The package where events are is net.advancedplugins.ae.impl.effects.api and net.advancedplugins.ae.api

Don't use deprecated events! These might not be called at all at times!

@EventHandler
public void onEnchantActivate(EffectsActivateEvent e) {
    // Do as you wish or cancel the event
}

Last updated