Skip to content

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.

val session = daisy.scoreboards?.show(player, profileSidebar(player))
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

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.