Skip to content

First Plugin

This is the simplest good starting point when you want DaisyCore to own your plugin runtime.

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()
}
}
  • 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

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.