Scoreboard
The Scoreboard blocks.
scoreboard of [Player]
The scoreboard on the right side of this player's screen. Each player has their own. Changes to it only show up after an update scoreboard block.
| Slot | Takes | What it is for |
|---|---|---|
| 1 | Player | The player whose scoreboard it is. |
Gives back: scoreboard
Script: player.scoreboard()
set title of [scoreboard] to [text]
Sets the title shown above the lines. Colours and styles work with MiniMessage tags like <gold>. Shows up at the next update.
| Slot | Takes | What it is for |
|---|---|---|
| 1 | scoreboard | The scoreboard to change. |
| 2 | text | The title. |
Script: scoreboardState.setTitle(text)
set line [number] of [scoreboard] to [text]
Sets one line of the scoreboard. Line 1 is at the top, and there are 15 lines. Lines you skip stay empty. Colours and styles work with MiniMessage tags like <red>. Shows up at the next update.
| Slot | Takes | What it is for |
|---|---|---|
| 1 | number | Which line, from 1 to 15. |
| 2 | scoreboard | The scoreboard to change. |
| 3 | text | The text of the line. |
Script: scoreboardState.setLine(number, text)
remove line [number] from [scoreboard]
Removes one line. The lines below it do not move up. Shows up at the next update.
| Slot | Takes | What it is for |
|---|---|---|
| 1 | number | Which line, from 1 to 15. |
| 2 | scoreboard | The scoreboard to change. |
Script: scoreboardState.removeLine(number)
remove every line from [scoreboard]
Removes every line but keeps the title. Shows up at the next update.
| Slot | Takes | What it is for |
|---|---|---|
| 1 | scoreboard | The scoreboard to change. |
Script: scoreboardState.clear()
update [scoreboard]
Shows the scoreboard with every change made since the last update, all at once and without flicker. Only lines that changed are sent to the player, so updating often is cheap.
| Slot | Takes | What it is for |
|---|---|---|
| 1 | scoreboard | The scoreboard to show. |
Script: scoreboardState.update()
hide [scoreboard]
Takes the scoreboard off the player's screen. Its lines are kept, so the next update shows it again.
| Slot | Takes | What it is for |
|---|---|---|
| 1 | scoreboard | The scoreboard to hide. |
Script: scoreboardState.hide()