Scoreboard

The scoreboard system is a complex gameplay mechanic. It is used via commands and command blocks.

Objectives
Objectives are a combination of name, display name, and criteria, and track an integer number of points for players. The full score range is -2,147,483,648 to 2,147,483,647, and does not support decimals.

An objective's name is used internally when referenced in commands, target arguments, and in the file format. It is case-sensitive and must be a single word.

Conversely, the display name can be multiple words, and is displayed publicly in various situations. It is also case-sensitive.

An objective's criteria determines its behavior:
 * "dummy": score is only changed by commands, and not by game events such as death. This is useful for event flags
 * "deathCount": score increments automatically for a player when they die
 * "playerKillCount": score increments automatically for a player when they kill another player
 * "totalKillCount": score increments automatically for a player when they kill players and mobs

A player's score in any objective may be changed via commands, regardless of its criteria. It may be increased or decreased by a specific amount, or set to a specific value. Command blocks can also be used to check a player's score for any objective, with the arguments score_name and score_name_min. In these arguments, name is the internal name of the objective to test for. score_name passes players with at most the specified number of points, while score_name_min passes players with at least the specified number of points. For example, "testfor @p[score_deaths=5,score_deaths_min=1]" in a Command Block will make a comparator provide output if a player has died at least once and has died no more than 5 times, assuming "deaths" is an objective of the "deathCount" criteria.

NBT format
The file scoreboard.dat in the 'data' folder of a Minecraft world stores the scoreboard data for that world as a GZip'd NBT file:


 * The root tag.
 * : The scoreboard data.
 * : A list of compound tags representing objectives.
 * An objective.
 * : The criteria of this objective. Must be "dummy", "deathCount", "playerKillCount", or "totalKillCount".
 * : The display name of this objective. If none was specified during the objective's creation, this will be identical to the Name tag below.
 * : The internal name of this objective.
 * : A list of compound tags representing scores tracked by the scoreboard system.
 * A tracked player/objective pair with a score.
 * : The score this player has in this objective.
 * : The name of the player who has this score in this objective.
 * : The internal name of the objective which this player has this score in.
 * : A set of slots which are displaying specific objectives.
 * : The internal name of the objective displayed in the "list" slot.
 * : The internal name of the objective displayed in the "sidebar" slot.

Bugs

 * If a scoreboard is displayed in the sidebar, it will disappear when traveling to/from the Nether and can only be restored by closing and opening the map, then running the set scoreboard display again.
 * Occasionally, an objective set to the sidebar will not show up until you set the same objective to the player list, then open the list with Tab.
 * The "/scoreboard players reset" command does not work on specifiers such as @p
 * Error messages when using commands imply the existence of "/scoreboard objectives cleardisplay" and "/scoreboard players player", but these commands are currently unused.

Gallery
Scoreboard Tableau de bord 计分板