EliteEnchantments
  • Home
  • Frequently Asked Questions
  • Support
  • General Information
    • Creating Enchantments
      • Effects
      • Conditions
      • Types
      • Options
    • Web Panel
      • Guide
    • Commands & Permissions
    • Giving Items
    • Developer API
      • Creating Effects
      • Creating Conditions
    • Where to purchase?
  • Addons
    • Gkits
      • Frequently Asked Questions
      • Commands & Permissions
      • Creating GKits
      • Example GKit
Powered by GitBook
On this page

Was this helpful?

  1. General Information

Developer API

The Developer API for EliteEnchantments.

You can access the EliteEnchantmentsAPI by doing the following: EliteEnchantmentsAPI.getAPI(). then the method from below

    public CustomEnchant getEnchant(String enchant);
    
    public ItemStack applyEnchant(ItemStack itemStack, CustomEnchant customEnchant, int level);

    public ItemStack applyEnchant(ItemStack itemStack, CustomEnchant customEnchant, int level, boolean force);

    public EnchantGroup getEnchantGroup(CustomEnchant customEnchant);

    public EnchantGroup getEnchantGroup(String group);

    public List<CustomEnchant> getEnchantsInGroup(String group);

    @SafeVarargs
    public final void registerEffects(Class<? extends CustomEffect>... effects);

    public void registerConditions(Condition... conditions);

    public EnchantItemController getEnchantItemController();

There is also a couple of custom events you can listen to:

EnchantActivationEvent

EnchantDeactivationEvent

EnchantItemEvent

PreEnchantItemEvent

PreviousGiving ItemsNextCreating Effects

Last updated 2 years ago

Was this helpful?