Scoreboard



The scoreboard system is a complex gameplay mechanic utilized through commands. Mainly intended for mapmakers and server operators, scoreboards are used to track, set, and list the scores of entities in a myriad of different ways.

Objectives
Objectives each have three main parameters: A name, a criterion, and a display name. Objectives track a number of points for entities, and are displayed as integers with a full score range of -2,147,483,648 to 2,147,483,647.

An objective's name is used internally for referencing in commands, target arguments, and the file format. The allowed character set for it includes all lowercase and uppercase letters, numbers, underscore, period, minus and plus.

An objective's display name is a raw JSON text and is displayed publicly in various situations. It does not have to be unique.

An objective's criterion determines its behavior&mdash;primarily what to track. Lists of valid criteria are provided below.

An entity's score in any objective can be changed via commands unless it's read-only. It can be increased by, decreased by, or set to a given amount. All statistics-based objectives can be changed via commands. Player statistics are stored separately, and as they update, scores in these objectives are updated in parallel.

A score holder is a player's name or an entity's UUID that has scores in an objective. Scores of non-player entities can be changed only by commands, and not by game events. Unlike players, when a non player entity dies, its scores are deleted.

Commands can check entity scores by using target selection with the  argument (syntaxed  . This argument uses to specify the internal name of the tested-for objective.


 * For example, inputting into a command block triggers a comparator or conditional command block if any player has died at least once, assuming "deaths" is an objective of the "deathCount" criterion.

Criteria
$$, some criteria use the Statistics system to form compound criteria. Unlike the simple criteria above, compound criteria have sub-parts in their names, delimited with periods (.). For example, "minecraft.killed_by:minecraft.zombie" is a valid compound criterion, under which player scores would increment whenever they're killed by zombie.

All compiund criteria can be modified with commands. A list of known compound criteria $$ follows:

{| class="wikitable" style="width:100%" data-description="Compound criteria" ! Criteria Base Name ! Description ! Can be Modified? ! Number of sub-criteria




 * minecraft.custom:minecraft.
 * Base criterion for all those related to a player's statistics. Player scores increment automatically for a player when they perform the action relevant to the sub-criterion.

These criteria follow the complete format, where   is an item from the list: Note that "damage_dealt" does not track damage caused by player projectiles.
 * style="text-align:center" | 69
 * style="text-align:center" | 69




 * minecraft.crafted:minecraft.
 * Sub-criteria include ID for craftable or smeltable blocks and items (e.g. "minecraft.crafted:minecraft.stone"&mdash;Note that both "minecraft." are required). Scores under these criteria increment by an amount equal to the number of items crafted or smelted, upon removing a block or item from the output of a furnace, crafting table, or the 2x2 inventory crafting grid.

These criteria follow the complete format, where   is an item or block from the list:


 * style="text-align:center" | 263
 * style="text-align:center" | 263


 * minecraft.used:minecraft.
 * Sub-criteria include ID of "usable" blocks and items (e.g. "minecraft.used:minecraft.stone"). Most blocks and items are accepted, except various blocks which do not have an item form. Scores under this compound criterion increment when a player uses a block or item. "Use" is defined as when:
 * A shovel, a pickaxe, an axe, flint and steel, shears, a hoe, a bow, or a sword would normally consume durability
 * Score values do not increment when armor consumes durability.
 * Score values increment even if no durability is consumed, like when a torch is destroyed with an item that takes the key to use (e.g. pickaxes).
 * For fishing rods and carrots on sticks, score values increment when the key is used.
 * A block is placed
 * A painting, item frame, snowball, egg, spawn egg, any type of minecart or boat, eye of ender, ender pearl, bow, any type of throwable potion, Bottle o' Enchanting, or fishing rod spawns an entity
 * A cocoa pod is planted on a jungle log, or bone meal is used to grow plants like crops, grass, and saplings
 * A potion, bucket of milk, or any food (save cake) is consumed
 * An empty map, empty bucket, lava bucket, water bucket, milk bucket, book and quill, or potion turns into a new item
 * Score values do not increment when a bowl becomes mushroom stew or a bucket becomes milk.
 * A music disc is placed in a jukebox
 * Note that each record has a unique sub-criterion.

Score values do not increment when items are used on mobs&mdash;whether to name, tame, feed, breed, saddle, leash, shear, dye, milk, or gather stew from&mdash;when armor is equipped directly with, when leather armor is washed in a cauldron, and all instances mentioned above.

Of all the items attainable in Creative Mode (without the use of commands), there are 357 that can be applied as sub-criteria and 195 that cannot (This is including blocks with similar ID but different number values).

These criteria follow the complete format, where   is a block from the list:
 * style="text-align:center" | 318
 * style="text-align:center" | 318




 * minecraft.broken:minecraft.
 * Sub-criteria include ID of items with durability (e.g. "minecraft.broken:minecraft.bow"). Player scores increment when a player runs the durability of one of these items negative. Durability runs negative when the item's durability loss–condition is met and the item already has a durability of 0.

These criteria follow the complete format, where   is an item from the list:


 * style="text-align:center" | 52
 * style="text-align:center" | 52




 * minecraft.mined:minecraft.
 * Sub-criteria include ID of blocks (such as "minecraft.mined:minecraft.stone"). Most blocks are valid, except for various indestructible or technical blocks. Player scores increment when the player mines a block. To "mine" is defined as destroying a block in a way that could/would drop an item, unless the block doesn't drop an item like glass or ice mined with an unenchanted tool. The value still increases if the doTileDrops gamerule is false, and it never increases for a player in Creative Mode.

These criteria follow the complete format, where   is a block from the list:
 * style="text-align:center" | 676
 * style="text-align:center" | 676




 * minecraft.killed:minecraft.
 * Sub-criteria include entity types. Any entity type is valid, although many such as "egg" don't seem to do anything.

These criteria follow the complete format, where   is a valid type of entity.
 * style="text-align:center" | 43
 * style="text-align:center" | 43




 * minecraft.picked_up:minecraft.
 * Sub-criteria include ID of blocks and items (e.g. "minecraft.picked_up.minecraft.stone"). Player scores increment when the player picks up a dropped item.

These criteria follow the complete format, where   is a block or item.
 * style="text-align:center" | 392
 * style="text-align:center" | 392




 * minecraft.dropped:minecraft.
 * Sub-criteria include ID of blocks and items (e.g. "minecraft.dropped:minecraft.dirt"). Player scores increment when a player drops an item by using the key.

These criteria follow the complete format, where   is a block or item.
 * style="text-align:center" | 392
 * style="text-align:center" | 392



Note that if the name of a passive mob or non-damaging entity is named, like an armor stand, player scores never increase; exceptions are rabbits and chickens if they are the Killer Bunny or a chicken jockey.
 * minecraft.killed_by:minecraft.
 * Sub-criteria include types of entities. Any entity type is valid. Player scores increment when the player is killed by an entity of that type.

These criteria follow the complete format, where   is a valid entity type.
 * style="text-align:center" | 43
 * style="text-align:center" | 43




 * teamkill.
 * Sub-criteria include team colors. Player scores increment when a player kills a member of the given colored team.

These criteria follow the complete format, where   is a color from the list:
 * style="text-align:center"|16
 * style="text-align:center"|16




 * killedByTeam.
 * Sub-criteria include team colors. Player scores increment when a player has been killed by a member of the given colored team.

These criteria follow the complete format, where   is a color from the list:


 * style="text-align:center"|16
 * }
 * }



Display slots
Via the command (see command reference), players' scores in specific objectives can be displayed in certain 'slots' in-game. Each 'display slot' can show one objective at a time, and multiple 'display slots' may be used for the same or different objectives.

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 criterion of this objective.
 * : The display name of this objective in JSON. If none was specified during the objective's creation, this is set to.
 * : The internal name of this objective.
 * : The way the score is displayed. Can be "integer" or "hearts", but defaults to "integer".
 * : 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.
 * : 1 or 0 (true/false) - false if this objective is "enabled". Only meaningful for objectives with the criteria "trigger", where this must be false before a player can use the /trigger command on it.
 * : A list of compound tags representing teams.
 * A Team.
 * : 1 or 0 (true/false) - true if players on this team can harm each other.
 * : 1 or 0 (true/false) - true if players on this team can see invisible teammates.
 * : The value of the nametagVisibility option of this team.
 * : The value of the deathMessageVisibility option of this team. Valid options are: never, hideForOtherTeams, hideForOwnTeam, always
 * : The value of the collisionrule option of this team. Valid options are: always, pushOwnTeam, never, pushOtherTeams
 * : The display name of this team in JSON. If none was specified during the team's creation, this is set to.
 * : The internal name of this team.
 * : The prefix prepended to names of players on this team. In JSON format.
 * : The suffix appended to names of players on this team. In JSON format
 * : The text-based color ("black", "dark_blue", etc.) given to the team. Does not exist if no color is set.
 * : A list of names of players on this team.
 * The name of a player on this team.
 * : A set of slots which are displaying specific objectives. If a slot is empty, its tag is not present.
 * : The internal name of the objective displayed in the "list" slot.
 * : The internal name of the objective displayed in the "sidebar" slot.
 * : The internal name of the objective displayed in the "belowName" slot.
 * : The internal name of the objective displayed in the "sidebar.team.black" slot.
 * : The internal name of the objective displayed in the "sidebar.team.dark_blue" slot.
 * : The internal name of the objective displayed in the "sidebar.team.dark_green" slot.
 * : The internal name of the objective displayed in the "sidebar.team.dark_aqua" slot.
 * : The internal name of the objective displayed in the "sidebar.team.dark_red" slot.
 * : The internal name of the objective displayed in the "sidebar.team.dark_purple" slot.
 * : The internal name of the objective displayed in the "sidebar.team.gold" slot.
 * : The internal name of the objective displayed in the "sidebar.team.gray" slot.
 * : The internal name of the objective displayed in the "sidebar.team.dark_gray" slot.
 * : The internal name of the objective displayed in the "sidebar.team.blue" slot.
 * : The internal name of the objective displayed in the "sidebar.team.green" slot.
 * : The internal name of the objective displayed in the "sidebar.team.aqua" slot.
 * : The internal name of the objective displayed in the "sidebar.team.red" slot.
 * : The internal name of the objective displayed in the "sidebar.team.light_purple" slot.
 * : The internal name of the objective displayed in the "sidebar.team.yellow" slot.
 * : The internal name of the objective displayed in the "sidebar.team.white" slot.