
Command
/scoreboard
Creates and manages scoreboard objectives, sets where they are shown, and reads or changes the scores of players and other entities.
| /scoreboard objectives add <objective> <criteria> [<displayName>] |
| /scoreboard objectives list |
| /scoreboard objectives modify <objective> (displayautoupdate <value>|displayname <displayName>) |
| /scoreboard objectives modify <objective> numberformat |
| /scoreboard objectives modify <objective> numberformat blank |
| /scoreboard objectives modify <objective> numberformat (fixed <contents>|styled <style>) |
| /scoreboard objectives modify <objective> rendertype (hearts|integer) |
| /scoreboard objectives remove <objective> |
| /scoreboard objectives setdisplay <slot> [<objective>] |
| /scoreboard players (add <targets>|remove <targets>) <objective> <score> |
| /scoreboard players display name <targets> <objective> [<name>] |
| /scoreboard players display numberformat <targets> <objective> |
| /scoreboard players display numberformat <targets> <objective> blank |
| /scoreboard players display numberformat <targets> <objective> (fixed <contents>|styled <style>) |
| /scoreboard players (enable <targets>|get <target>) <objective> |
| /scoreboard players list [<target>] |
| /scoreboard players operation <targets> <targetObjective> <operation> <source> <sourceObjective> |
| /scoreboard players reset <targets> [<objective>] |
| /scoreboard players set <targets> <objective> <score> |
| Argument | Kind of value | What to type |
|---|---|---|
| <objective> | Text | The objective's name. For objectives add it is the new name, one word without spaces. Everywhere else it must be an existing objective. |
| <criteria> | Objective criterion | What the objective counts: dummy, trigger, deathCount, playerKillCount, totalKillCount, health, food, air, armor, xp, level, teamkill.<color>, killedByTeam.<color>, or a statistic such as minecraft.custom:minecraft.jump. |
| <displayName> | Text component | The name shown for the objective, written as a text component such as "Kills" or {text:"Kills",color:"red"}. |
| <value> | True or false | true or false for displayautoupdate. |
| <contents> | Text component | The text component shown instead of the number with numberformat fixed. |
| <style> | Text style | The text style used for the number with numberformat styled, for example {color:"gold"}. |
| <slot> | Display slot | The display slot: list, sidebar, below_name or sidebar.team.<color>. |
| <targets> | Score holder | The score holders to change: a target selector, a name, or * for all tracked score holders. |
| <score> | Whole number | The number to set (any whole number), or the amount to add or remove (0 or more). At least 0. |
| <name> | Text component | The text component shown in place of the score holder's name with players display name. |
| <target> | Score holder | A single score holder for players get and players list. |
| <targetObjective> | Scoreboard objective | The objective whose score is changed by players operation. It must not be read-only. |
| <operation> | Score operation | One of =, +=, -=, *=, /=, %=, <, >, ><. |
| <source> | Score holder | The score holders whose scores are used as the second value in players operation. |
| <sourceObjective> | Scoreboard objective | The objective the source scores are read from. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Singleplayer with cheats enabled, multiplayer servers, command blocks and functions. Needs permission level 2 (gamemasters): operators, players in a world with cheats enabled, command blocks and functions. |
| Result | Each sub-command reports what it changed. Numeric results: objectives add and objectives remove return the number of objectives that now exist; objectives list returns the number of objectives; objectives setdisplay and objectives modify return 0. players get returns the score; players set, add, remove and operation return the sum of the new scores of all targets; players reset and players display return the number of targets; players enable returns the number of targets whose trigger was newly enabled; players list returns the number of tracked score holders, or with a target the number of scores that target has. |
| objectives add | Creates an objective with a name, a criterion and an optional display name. The name is a single word without spaces. Without a display name the name itself is shown. Fails with "An objective already exists by that name" if the name is taken. |
| Criteria | Basic criteria: dummy (changed only by commands), trigger (players change it themselves with /trigger), deathCount, playerKillCount, totalKillCount, health, food, air, armor, xp, level. Team criteria: teamkill.<color> and killedByTeam.<color> with a team color such as red or dark_blue. Statistic criteria use the form minecraft.<type>:minecraft.<id> with the types broken, crafted, custom, dropped, killed, killed_by, mined, picked_up and used, for example minecraft.mined:minecraft.stone or minecraft.custom:minecraft.jump. |
| Read-only criteria | health, food, air, armor, xp and level are kept up to date by the game. Their scores cannot be changed with players set, add, remove or as the target of operation: "Scoreboard objective ... is read-only". |
| objectives list and remove | objectives list shows all objectives. objectives remove deletes an objective together with all of its scores. |
| objectives setdisplay | Shows an objective in a display slot. Slots: list (the player list), sidebar (the right side of the screen), below_name (under player name tags), and sidebar.team.<color> for a sidebar tied to a team color, with the colors black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow and white. Leaving out the objective clears the slot. Fails if the slot is already empty or already shows that objective. |
| objectives modify | displayname changes the shown name. rendertype switches between integer (numbers) and hearts (heart icons); health uses hearts by default, all others integer. numberformat sets the default look of all scores in the objective. displayautoupdate true or false turns the objective's display auto-update on or off. |
| Number formats | blank hides the number. fixed <contents> shows a fixed text instead of the number. styled <style> shows the number with a text style such as {color:"gold",bold:true}. Writing numberformat with nothing after it removes the format again. The same options exist for a whole objective (objectives modify ... numberformat) and for single score holders (players display numberformat). |
| players set, add, remove | set gives a score any whole number from -2147483648 to 2147483647. add and remove take an amount of 0 or more and change the current score by it. A target that has no score yet starts at 0. |
| players get and list | get shows one target's score and fails with "Can't get value of ... for ...; none is set" if there is none. list without a target shows every tracked name; with a target it shows all scores of that target. |
| players reset | Removes the targets' score in one objective, or all of their scores when no objective is given. A reset score is no longer set at all, which is different from 0. |
| players enable | Lets the targets use /trigger once on an objective with the trigger criterion. Fails with "Enable only works on trigger-objectives" for other objectives and with "Nothing changed. That trigger is already enabled" if no target was changed. |
| players operation | Changes the target score using a source score. Signs: = sets the target to the source, += adds, -= subtracts, *= multiplies, /= divides (rounded down), %= leaves the remainder of the division (never negative for a positive divisor), < keeps the smaller of the two, > keeps the larger, >< swaps the two scores. Dividing by 0 fails with "Cannot divide by zero". With several sources the operation is applied once for each source. |
| players display | display name gives a score holder a different name in the scoreboard display for one objective; leaving out the name removes it. display numberformat changes how that holder's number looks in that objective. |
| Score holders | Targets can be target selectors, player names or any made-up name such as #total. * stands for every tracked score holder. A selector that finds nothing fails with "No relevant score holders could be found". |
/scoreboard objectives add kills playerKillCount "Kills"Creates an objective named kills that counts player kills and is shown as Kills.
/scoreboard objectives add points dummyCreates an objective named points that only changes through commands.
/scoreboard objectives setdisplay sidebar killsShows the kills objective on the right side of the screen.
/scoreboard players set @s points 10Sets your points score to 10.
/scoreboard players add @a points 1Adds 1 point to every online player.
/scoreboard players operation @s points += @s killsAdds your kills score to your points score.
/scoreboard objectives modify points numberformat styled {color:"gold"}Shows all numbers of the points objective in gold.
/scoreboard players reset @a pointsRemoves the points score of every online player.



