Develop a native Obsidrel addon
A native addon is loaded from plugins/Obsidrel/addons/, not the server's ordinary plugins/ directory. It follows a lifecycle and receives an owned AddonContext.
Descriptor
Put an obsidrel-addon.yml at the JAR root:
id: example-addon
name: Example Addon
version: 1.0.0
main: com.example.obsidrel.ExampleAddon
api-level: 1
core: ">=0.9.1-RC60-HF1"
authors: [Example]
dependencies: []
soft-dependencies: []
conflicts: []
The example's minimum Core is an illustrative constraint from the public README. Set it to the actual minimum version your addon was tested against.
Lifecycle and cleanup
Implement ObsidrelAddon using onLoad(AddonContext), onEnable(AddonContext) and onDisable(AddonContext). Register listeners, placeholders, action handlers, item mechanics, importer providers and scheduled tasks through the context, so registrations/resources can be closed automatically on disable or reload.
Integration checklist
- Compile against public ObsidrelAPI with provided/compileOnly.
- Implement the addon and include its descriptor.
- Check dependencies and conflicts in the descriptor.
- Install JAR into the Obsidrel addons directory.
- Restart the server, check startup logs, and test load and unload.
- Never shade API classes or access private Core packages.
See Extensions and SourceImporter API for addon-specific integrations.