First Scoreboard
First Scoreboard
Section titled “First Scoreboard”This page shows the modern DaisyCore sidebar path:
- MiniMessage-first title and line text
- keyed lines for targeted refresh
- shared config-backed text later, not first
Step 1: build a sidebar with direct MiniMessage strings
Section titled “Step 1: build a sidebar with direct MiniMessage strings”fun profileSidebar(player: Player) = sidebar { title("<gradient:#7dd3fc:#c4b5fd>Profile</gradient>")
line("name") { text("<white>${player.name}</white>") }
line("coins") { text("<gray>Coins: <white>1,250</white>") } }This is already the normal path.
You do not need a config key just to render a sidebar title or line.
Step 2: show it to a player
Section titled “Step 2: show it to a player”val session = daisy.scoreboards?.show(player, profileSidebar(player))Step 3: refresh only what changed
Section titled “Step 3: refresh only what changed”session?.invalidate("coins")session?.refreshNow()Sidebar lines are keyed so DaisyCore can refresh the right parts cleanly instead of blindly rebuilding everything.
That is why line("coins") { ... } is the normal path.
Step 4: use shared config-backed text when your plugin is already config-heavy
Section titled “Step 4: use shared config-backed text when your plugin is already config-heavy”fun profileSidebar(player: Player) = sidebar { titleLang("profile.sidebar.title", viewer = player)
line("coins") { textLang("profile.sidebar.coins", viewer = player, "coins" to "1,250") } }That becomes useful when you want:
- admin-editable sidebar text
- localization
- one shared text source across the plugin
- reloadable UI wording
Current runtime truth
Section titled “Current runtime truth”The public sidebar surface is intentionally focused on:
- titles
- keyed lines
- targeted invalidation
- clean player/session ownership
- MiniMessage-first rendering through DaisyCore
Current default
Start with direct MiniMessage strings. Use shared key-backed text only when your plugin already stores sidebar text outside code.
Next steps
Section titled “Next steps”- Add a header and footer too: First Tablist
- Read the rendering model: Sidebar Refresh and Diffing
- Jump to API details: Sidebar DSL