Addon API

Addons are standalone jars dropped in plugins/IgniteSky/addons/. IgniteSky loads each one on startup, hands it a typed API, and disables it on shutdown or reload. Addons talk to IgniteSky only through the API (ignitesky-api); there is no reflection into internals, so an addon written today keeps working as the plugin evolves.

1. Depend on the API

Add ignitesky-api as a compileOnly dependency. It is provided at runtime by IgniteSky.

build.gradle
dependencies {
  compileOnly 'com.ignitedev:ignitesky-api:1.0.0'
  compileOnly 'io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT'
}

2. Write the addon

Extend IgniteAddon. The base class gives you api(), data(), logger() and the full context() (the host plugin for listeners and tasks, your private data folder, and the descriptor).

MyAddon.java
package com.example.myaddon;
 
import com.ignitedev.ignitesky.api.addon.IgniteAddon;
import org.bukkit.Bukkit;
 
public final class MyAddon extends IgniteAddon {
 
  @Override
  public void onEnable() {
    logger().info("MyAddon starting");
 
    // Persistent, namespaced to this addon, survives restarts:
    int runs = Integer.parseInt(data().getOr("runs", "0")) + 1;
    data().set("runs", String.valueOf(runs));
 
    // A normal Bukkit listener, registered against the host plugin:
    Bukkit.getPluginManager().registerEvents(new MyListener(api()), context().getPlugin());
  }
 
  @Override
  public void onDisable() {
    logger().info("MyAddon stopping");
  }
}

A listener uses the public island events and IgniteSkyAPI directly, all typed:

MyListener.java
import com.ignitedev.ignitesky.api.IgniteSkyAPI;
import com.ignitedev.ignitesky.api.event.IslandCreateEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
 
public record MyListener(IgniteSkyAPI api) implements Listener {
 
  @EventHandler
  public void onCreate(IslandCreateEvent event) {
    // react to a new island via event.getIsland() / the api
  }
}

3. Ship addon.yml

Put addon.yml in the jar root:

addon.yml
name: MyAddon
main: com.example.myaddon.MyAddon
version: 1.0.0
description: Does something useful with islands.

4. Install

Drop the jar in plugins/IgniteSky/addons/ and start, or run /is admin reload (which tears addons down and back up). See Addons for the operator commands.

Why no reflection

Every integration point in IgniteSky is a typed dependency: the addon base class, the events, the API. The only unavoidable reflection is the single instantiation of your addon's main class, exactly like Bukkit loading a plugin. That discipline is what keeps addons from breaking on updates.

For the worth and world SPIs (feeding island value from a shop, or hosting worlds in Slime format), see Extension Points.