Developer API
MF-SlimeFun contains Slimefun-oriented APIs for addon developers. These are classes observed in the supplied source, not a promise of binary compatibility across all forks or future builds. Compile against the exact deployed MF-SlimeFun artifact.
Addon Interface
Section titled “Addon Interface”The source includes:
io.github.thebusybiscuit.slimefun4.api.SlimefunAddonAn addon implements getJavaPlugin() and getBugTrackerURL(). The interface also provides helpers such as getName(), getPluginVersion(), and hasDependency(String).
Item Lookup
Section titled “Item Lookup”The inspected SlimefunItem class provides:
SlimefunItem.getById(String id);SlimefunItem.getOptionalById(String id);Handle missing item IDs and disabled addons. An addon must not assume every registered item is present in a particular server configuration.
Events
Section titled “Events”Examples of event classes in the supplied source:
| Event | Purpose |
|---|---|
PlayerPreResearchEvent |
Cancellable hook before research processing. |
ResearchUnlockEvent |
Research-unlock event with cancellation support. |
SlimefunBlockPlaceEvent |
Slimefun block placement event. |
SlimefunBlockBreakEvent |
Slimefun block break event. |
SlimefunGuideOpenEvent |
Guide-opening event. |
Examine each event’s actual fields and cancellation contract in the target build before writing a listener. Follow Bukkit/Paper primary-thread rules for world and inventory operations.
Legacy API
Section titled “Legacy API”The source retains me.mrCookieSlime.Slimefun.api.Slimefun for compatibility, but it is marked @Deprecated. Do not treat deprecated convenience methods as a guaranteed long-term extension API.
See Building From Source.