# Addon creation

Maven

<dependency>
    <groupId>org.spicord</groupId>
    <artifactId>spicord-common</artifactId>
    <version>5.3.0</version>
    <scope>provided</scope>
</dependency>

Addon class creation

import org.spicord.api.addon.SimpleAddon;
import org.spicord.bot.DiscordBot;

import net.dv8tion.jda.api.JDA;

public class YourAddon extends SimpleAddon {

    public YourAddon() {
        super("YourAddonName", "your_addon_id", "TheAuthor");
    }

    @Override
    public void onReady(DiscordBot bot) {
        // If you know how to use the JDA api you can go ahead and use it as usual.
        JDA jda = bot.getJda();
    }
}

Example addon registration with a spigot plugin

import org.spicord.SpicordLoader;

public class YourPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        YourAddon addonInstance = new YourAddon();

        SpicordLoader.addStartupListener(spicord -> {
            spicord.getAddonManager().registerAddon(addonInstance);
        });
    }
}