Scoreboard

The scoreboard is the sidebar shown on the right side of the player's screen. The scoreboard is made of a title and 1 to 15 lines of text. If there are no values (the 1-15 lines of text), then the scoreboard won't be shown.

The values can only be a maximum of 42 characters long (color codes included).

Commonly used methods

General

The scoreboard won't be shown if it is empty.

Giving the player a scoreboard

api.giveScoreboard(player);

Checking if the player has a scoreboard already

api.hasScoreboard(player);

Removing scoreboard from player

api.removeScoreboard(player);

Scoreboard title

The scoreboard title can only be a maximum of 32 characters long (color codes included).

Setting the title

api.setScoreboardTitle(player, "My title");
api.setScoreboardTitleWithPlaceholders(player, "My title");

Getting the title

api.getScoreboardTitle(player);

Scoreboard values

The index is a number from 1 to 15 inclusive.

Setting without placeholders

api.setScoreboardValue(player, index, "My value");
api.setScoreboardValueWithPlaceholders(player, 1, "My value");

Getting a value at a given index

api.getScoreboardValue(player, index);

Removing a value at a given index

api.removeScoreboardValue(player, index);