First Plugin
First Plugin
Section titled “First Plugin”This is the simplest good starting point when you want DaisyCore to own your plugin runtime.
What you’ll build
Section titled “What you’ll build”By the end of this page, you will have a Paper plugin that creates a DaisyPlatform during startup and closes it during shutdown.
class MyPlugin : JavaPlugin() { private lateinit var daisy: DaisyPlatform
override fun onEnable() { daisy = DaisyPlatform.create(this) { text() placeholders() items() scoreboards() tablists() commands() menus() } }
override fun onDisable() { daisy.close() }}What this bootstrap does
Section titled “What this bootstrap does”- creates the shared DaisyCore runtime
- creates a placeholder registry
- enables item and text helpers
- auto-loads command providers by scanning your plugin jar for
@DaisyCommandSet - enables menu, scoreboard, and tablist services
Why this matters
Section titled “Why this matters”DaisyPlatform is the object that owns the DaisyCore systems you enabled. It is responsible for lifecycle cleanup, so closing it during plugin shutdown is not optional boilerplate. It is how your menus, sidebars, tablists, and command runtime get cleaned up safely.
Current behavior
The platform builder is the one public bootstrap path DaisyCore wants plugin users to learn first. It keeps lifecycle ownership and service initialization in one place.
Next steps
Section titled “Next steps”- Create your first auto-loaded command: First Command
- Learn how command discovery works: Auto-Loaded Commands
- Understand platform ownership: Runtime and Shutdown