Build a Plugin Flow
Build a Plugin Flow
Section titled “Build a Plugin Flow”Build one believable DaisyCore feature instead of learning commands, menus, sidebars, and tablists as disconnected fragments.
Bootstrap DaisyCore once
You can build this entire flow with direct MiniMessage strings. Shared config-backed text is the scaling path, not the requirement.
DaisyPlatform.create(…) plus daisy.close() is also the stable lifecycle contract for DaisyCore 0.1.0.
class ProfilePlugin : JavaPlugin() { lateinit var daisy: DaisyPlatform private set
override fun onEnable() { daisy = DaisyPlatform.create(this) { commands() menus() scoreboards() tablists() } }
override fun onDisable() { daisy.close() }}Build sidebar and tablist with direct MiniMessage strings
fun profileSidebar(player: Player) = sidebar { title("<gradient:#7dd3fc:#c4b5fd>Profile</gradient>") line("coins") { text("<gray>Coins: <white>1,250</white>") } }
fun profileTablist(player: Player) = tablist { header("<gradient:#7dd3fc:#c4b5fd>Welcome back</gradient>\n<white>${player.name}</white>") footer("<gray>Coins: <white>1,250</white>") }That is the honest tablist scope for this release line: header and footer rendering, not richer tab entry formatting.
Connect everything inside one command group
@DaisyCommandSetobject ProfileCommands : DaisyCommandGroup({ command("profile") { description("Open your profile tools")
player { reply("<gradient:#7dd3fc:#c4b5fd>Opening your profile.</gradient>")
player.openMenu("Profile", rows = 3) { background(Material.GRAY_STAINED_GLASS_PANE) { name(" ") }
slot(13) { item(Material.PLAYER_HEAD) { name("<gradient:#7dd3fc:#c4b5fd>${player.name}</gradient>") lore( "<gray>Inline Daisy menu flow</gray>", "<white>Built for ${player.name}</white>", ) }
message("<gray>Clicked the profile card.</gray>") closeOnClick() } }
daisy.scoreboards?.show(player, profileSidebar(player)) daisy.tablists?.show(player, profileTablist(player)) } }})Move to shared text only when the plugin is config-heavy
Requires DaisyConfig
If your plugin keeps wording in config or lang files, swap local strings for replyLang(...), nameLang(...), titleLang(...), and related helpers. Those config paths are useful scaling tools, not DaisyCore requirements.
You’ve built the runtime flow
Next read Config and Lang Text if the feature is becoming config-heavy, or use Build the Normal Stack when parser values, managed YAML, and runtime UI all matter in the same plugin.