AdvancedEnchantments
Get AdvancedEnchantmentsJoin DiscordUnlimited Minecraft Hosting
  • AdvancedEnchantments
  • ➡️AdvancedEnchantments UI
  • 🪄Enchantments
    • 📑List of Enchantments
      • Default Enchants (250+)
      • Cosmic Enchants (200+)
      • Vanilla+ Custom Enchants (60+)
    • Creating Enchantments
      • Triggers
      • Effects
      • Area of Effect
      • Settings
      • Effect Info
      • Complex Enchantments
    • Enchantment Conditions
    • ⏱️Repeating Enchantments
  • ℹ️General Information
    • Commands & Permissions
      • AEGive
    • Languages and Localization
    • 🔩Plugin Items
      • All plugin items
      • Item Configuration
      • Slot Increasers
    • Toggling Features
  • ⚙️Configuration
    • Random Loot, Villager Trades and Mob Drops
    • Default Files
    • Enchanter
    • Souls
    • Unsuccessful enchants
    • Per-Level Descriptions
    • Per-Level Books
    • Enchantments In Essentials Kits
    • GKits
      • GKit Permissions
      • Colored Leather Armor
    • Armor Sets
    • Drag&Drop books onto Player Heads
    • Groups
  • 💻For developers
    • Plugin API
    • Create Custom Effects
    • Plugin Compatiblity issues
  • Plugin Information
    • PlaceholderAPI placeholders
    • FAQ & Other Plugin Support
Powered by GitBook
On this page
  • Apply custom enchants
  • Listen to events

Was this helpful?

  1. For developers

Plugin API

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

PreviousGroupsNextCreate Custom Effects

Last updated 1 year ago

Was this helpful?

AEAPI class functions:

AEAPI

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
}
💻