-
Notifications
You must be signed in to change notification settings - Fork 1
api
FabledEnchants exposes a simple API to allow developers to register their own custom enchantments via Java code. This API is ideal for plugin developers who want to bundle unique enchantments with their own addons.
Before using the API, your plugin must:
- Depend on FabledEnchants
- Have
plugin.ymlproperly configured with the dependency
depend: [FabledEnchants]To create your own enchantment, extend the CustomEnchantment class provided by FabledEnchants.
public class MyEnchant extends CustomEnchantment {
public MyEnchant() {
super("MyEnchant", "Description of what it does");
}
}You can then override behavior methods like applyOnHit(...), applyEquip(...), etc.
👉 See Creating JAVA/API Enchants for full setup instructions.
To make your enchantment functional, it must be registered using the plugin API:
EnchantmentAPI.registerCustomEnchantment(new MyEnchant());You must run this inside your plugin's onEnable() method.
- Package:
com.sucy.enchant - Class:
EnchantmentAPI
This class is available at runtime when FabledEnchants is installed.
➡️ See Registering Enchants from Addons to bundle your custom enchants into a standalone plugin.