Overview
SimpleScoreboard provides an easy way to create and manage custom scoreboards for players. It handles automatic updates, supports color themes, and minimizes flickering.Maximum lengths
- Lines (1.8): 66 chars with color, 70 without
- Lines (1.13+): 98 chars with color, 104 without
- Lines (1.18+): 32,889 chars with color, 32,895 without
- Title (1.8): 30 chars with color, 32 without
- Title (1.13+): 126 chars with color, 128 without
Creating a scoreboard
Constructors
SimpleScoreboard()
Creates a scoreboard with no title, updating every second.SimpleScoreboard(String title)
Creates a scoreboard with a title, updating every second.The scoreboard title. Supports color codes.
SimpleScoreboard(String title, int updateDelayTicks)
Creates a scoreboard with a title and custom update interval.The scoreboard title. Supports color codes.
How often to update in ticks (20 = 1 second).
Scoreboards require Minecraft 1.7 or higher.
Methods
show
Shows the scoreboard to a player and starts the update task if not running.The player to show the scoreboard to.
hide
Hides the scoreboard from a player and stops the update task if no viewers remain.The player to hide the scoreboard from.
isViewing
Checks if a player is currently viewing this scoreboard.The player to check.
True if the player is viewing this scoreboard.
setTitle
Sets the scoreboard title.The new title. Automatically truncated if too long.
getTitle
Gets the current scoreboard title.The current title.
addRows
Adds rows to the scoreboard.The rows to add. Maximum 15 rows total.
setRow
Changes a specific row by index.The row index (0-based).
The new row value.
getRows
Gets the list of rows that you can modify.The mutable list of rows.
clearRows
Removes all rows from the scoreboard.removeRow (by index)
Removes a row at the specified index.The row index to remove.
removeRow (by content)
Removes all rows that contain the specified text.Text to search for in rows.
setTheme
Sets a color theme for rows containing ”:” (key: value pairs).Color for the key (before the colon).
Color for the value (after the colon).
setUpdateDelayTicks
Sets how often the scoreboard updates.Update interval in ticks (20 = 1 second).
getUpdateDelayTicks
Gets the current update interval.The update delay in ticks.
isRunning
Checks if the scoreboard is currently running and rendering.True if the update task is active.
stop
Stops the scoreboard and removes it from all viewers.Protected methods
onUpdate
Called automatically every update cycle. Override to update scoreboard content.replaceVariables
Called for each row to replace custom placeholders. Override for player-specific variables.The player viewing the scoreboard.
The row text.
The row text with variables replaced.
Static methods
clearBoards
Clears all registered scoreboards. Usually called on reload.clearBoardsFor
Removes all scoreboards for a specific player.The player to clear scoreboards for.
getRegisteredBoards
Gets all registered scoreboards.List of all registered scoreboards.
Complete example
Notes
- Scoreboards automatically handle color codes and long lines
- The
{player}variable is automatically replaced with the player’s name - Empty strings create blank lines for spacing
- Use themes for consistent coloring of key-value pairs
- The update task automatically stops when no players are viewing