By selecting “Accept all cookies,” you consent that Stack Exchange may put cookies on your computer and share information with third parties in accordance with our cookie policy.
Java Edition
Criteria base name | Description | Number of sub-criteria | ||
---|---|---|---|---|
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
|
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
|
16 |
Bedrock Edition
Currently, dummy is the only criterion supported. As such, score can only be changed by commands.
Display slots
Players’ scores for particular objectives can be displayed in specific game slots using the /scoreboard objectives setdisplay command (see command reference). One objective can be displayed at a time in each display slot, and multiple display slots can be used for the same or different objectives.
Slot | Description |
---|---|
list | Displays a yellow number or some hearts (/scoreboard objectives modify ) without a heading on the tab menu, where online players are shown.[Java Edition only]
Displays a white number without a heading on the Pause Menu, where online players are shown.[Bedrock Edition only] Visible even in singleplayer. |
sidebar | Shows on the right hand side of the screen. Shows up to 15 entities with the highest score of that objective with a heading labeled with the objectives |
sidebar.team. |
There are 16 team-specific sidebar display slots. These operate the same as the standard sidebar slot, but only display to players who are on teams which use the specified color (for example, “sidebar.team.green” displays to players on “green” teams). Valid colors are: “black”, “dark_blue”, “dark_green”, “dark_aqua”, “dark_red”, “dark_purple”, “gold”, “gray”, “dark_gray”, “blue”, “green”, “aqua”, “red”, “light_purple”, “yellow”, “white”. |
belowName | Shows the |
Tags are a straightforward list of single-word strings that are kept in an entity’s Tags data tag. As with objectives, tags are case-sensitive.
With the “tag” argument, target selectors can be used to determine whether an entity has a tag.
Teams”team” redirects here. For the command, see
A team’s variables include its name, display name, member name prefix, member name suffix, whether to allow friendly fire, and a list of its members.
Internally, references to a team’s name are made in commands, target arguments, and file formats. It is a single, case-sensitive word.
A teams DisplayName is a case-sensitive JSON text component that is displayed publicly in a variety of contexts.
Prefix for a team’s member name The chat, the list of players who are currently online, the sidebar, and above the heads of team members all use prefixes and suffixes. These can be edited with respective commands.
The AllowFriendlyFire option controls whether or not members of a team are able to damage each other. This defaults to true, leaving PvP mechanics unchanged—ergo, players can harm their teammates. When set to false, however, players on the same team are prevented from directly damaging each other with melee attacks, bows, and Splash Potions of Harming. Note that players on the same team may still inflict negative status effects on each other with potions, even if
It’s crucial to remember that each team member can only be on one team at a time; teams cannot share entities.
By combining target selection with the “team” argument, commands can be used to verify the existence of team members. (A name may have the! character before it to check for entities that are not members of a team.) (For instance, entering the command block /execute if entity @a[team=red] produces comparator output if any player is present on the red team. In contrast, /execute if entity @a[team=!red] provides output if the red team is empty. If any player is on at least one team, then /execute if entity @a[team=!] allows output, otherwise /execute if no players are on any teams.
Command reference
For more details, see Commands/scoreboard.
Objectives commands
Commands | Description |
---|---|
scoreboard objectives list | List all existing objectives with their display names and criteria. |
scoreboard objectives add |
Create a new objective with the given internal objective name, specified criterion, and the optional display name. In Bedrock Edition, “dummy” is the only criterion currently supported. defaults to when unspecified. See above section for more on these arguments. |
scoreboard objectives remove |
Delete all references to the named objective in the scoreboard system. Data is deleted from the objectives list and score holders scores, and if it was on a display list it is no longer displayed. |
scoreboard objectives setdisplay
|
Display score info for the objective in the given slot. Valid slots are listed and described in Display Slots. In Bedrock Edition, if slot is list or sidebar , there is an additional optional argument ascending|descending to specify the sort order. Note that the objective parameter is optional; if no objective is provided, this display slot is cleared (returned to its default state). |
scoreboard objectives modify |
Change the display name of the scoreboard in display slots. |
scoreboard objectives modify |
Change the display format of the player list. |
Players commands
Commands | Description |
---|---|
scoreboard players list [ |
Lists all score holders which are tracked in some way by the scoreboard system. The optional or playername: target parameter is used to list the scores of particular score holders. |
scoreboard players get |
Return the scoreboard value. |
scoreboard players set |
Set the targets scores of the given objective, overwriting any previous score. |
scoreboard players add |
Increments the targets scores in that objective by the given amount. |
scoreboard players remove |
Decrements the targets scores in that objective by the given amount. |
scoreboard players random |
Sets the targets scores in that objective to a random number between min and max, both inclusive. |
scoreboard players reset |
Deletes score or all scores for the target. If is specified, then only that objective is cleared. Otherwise, this applies to all objectives. Note that this does not merely set the score(s) to 0: it removes the targets from the scoreboard altogether (or for the given objective). |
scoreboard players test |
Tests if targets scores are within min: wildcard int and max: wildcard int (Defaults to 2,147,483,647). min: wildcard int can be replaced with asterisk (*) to represent -2,147,483,648, and max: wildcard int can be replaced with asterisk (*) to represent 2,147,483,647. |
scoreboard players enable |
Enables the target player(s) to use the /trigger command on the specified objective. This command accepts non-player entities, but only players are able to actually use the /trigger command. Until this has been done, players that attempt to /trigger that objective fail. Using the /trigger command disables it again. Note that if the target(s) did not previously have a score for the specified objective, this command will set their score to 0. |
scoreboard players operation |
Applies an arithmetic operation altering the targets score(s) in the target objective, using sources scores in the source objective as input.
In all cases except “><“, sources score remains unchanged. If target or source isnt tracked by the specified objective, it will be set to 0. If more than one score holder is specified as sources, performs the operation once with each sources score. If more than one target score holder is specified, performs the operation for each target one by one. |
Teams commands
The file scoreboard. The scoreboard data for a Minecraft world is stored as a GZipd NBT file named dat in the data folder:
- The root tag. data: The scoreboard data. Objectives: A list of compound tags representing objectives. An objective. CriteriaName: The criterion of this objective. DisplayName: The display name of this objective in JSON. This is set to “text”:”Value of Name” if no value was specified when the objectives were created. Name: The internal name of this objective. RenderType: The way the score is displayed. Can be “integer” or “hearts”, but defaults to “integer”. PlayerScores: A collection of compound tags that correspond to the scores that the scoreboard system tracks. A tracked player/objective pair with a score. Score: The score this player has in this objective. Name: The player’s name whose score in this objective is indicated. Goal: The internal name of the goal that this player has achieved this score in Locked: true if this objective is “disabled,” false otherwise Only relevant for objectives that have the criteria “trigger,” where a player cannot use the /trigger command on an objective until this is true. Teams: A list of compound tags representing teams. A Team. Players on this team can harm each other if AllowFriendlyFire is set to 1 or 0 (true/false). Players on this team can see their invisible teammates if SeeFriendlyInvisibles is set to 1 or 0 (true/false). NameTagVisibility: The value of the nametagVisibility option of this team. DeathMessageVisibility: The value of the deathMessageVisibility option of this team. Never, hideForOtherTeams, hideForOwnTeam, and always are acceptable choices. CollisionRule: This team’s collisionrule option value Valid choices include: always, pushOwnTeam, never, and pushOtherTeams DisplayName: This team’s JSON display name In the absence of any specification made when the team was created, this is set to “text”: “Value of Name.” Name: The internal name of this team. MemberNamePrefix: This team’s players’ names are prefixed with this prefix. In JSON format. The member name suffix is added to each player’s name on this team. In JSON format TeamColor: The text-based color (“black”, “dark_blue”, etc. ) given to the team. Does not exist if no color is set. Players: A list of names of players on this team. The name of a player on this team. DisplaySlots: A set of slots which are displaying specific objectives. If a slot is empty, its tag is not present. slot_n: The internal name of the objective displayed (see below).
No. | Type | Name |
---|---|---|
0 | Player list | list |
1 | On the sidebar | sidebar |
2 | Below the players username | belowName |
3 | Team color | sidebar.team.black |
4 | sidebar.team.dark_blue | |
5 | sidebar.team.dark_green | |
6 | sidebar.team.dark_aqua | |
7 | sidebar.team.dark_red | |
8 | sidebar.team.dark_purple | |
9 | sidebar.team.gold | |
10 | sidebar.team.gray | |
11 | sidebar.team.dark_gray | |
12 | sidebar.team.blue | |
13 | sidebar.team.green | |
14 | sidebar.team.aqua | |
15 | sidebar.team.red | |
16 | sidebar.team.light_purple | |
17 | sidebar.team.yellow | |
18 | sidebar.team.white |
Java Edition | |||||
---|---|---|---|---|---|
1.5 | 13w04a | Added scoreboard. | |||
13w05a | Added team-based functionality. | ||||
1.7.2 | 13w36a | Added statistic-based objective criteria. | |||
1.8 | 14w02a | Entities other than players can now be part of teams and have objective scores. | |||
14w06a | Added the trigger and team kill-based objective criteria. |
||||
Added /scoreboard players enable . |
|||||
“*” can be used in a player name argument to represent all players tracked by the scoreboard. | |||||
Added the “objective” argument to /scoreboard players reset . |
|||||
Statistic objective criteria now use named IDs instead of numerical IDs. | |||||
Added the achievement.overpowered objective criterion. |
|||||
14w07a | Added /scoreboard players operation and /scoreboard players test . |
||||
Scores for fake players that have a name beginning with “#” wont appear in the sidebar. | |||||
Added team-specific sidebar display slots. | |||||
Added the nametagVisibility team option. |
|||||
14w10a | Added the deathMessageVisibility team option. |
||||
Added a dataTag argument to /scoreboard players set , /scoreboard players add , and /scoreboard players remove . |
|||||
Added the stat.crouchOneCm , stat.sprintOneCm , and stat.timeSinceDeath objective criteria. |
|||||
14w25a | Added = , < , and > to /scoreboard players operation . |
||||
14w29a | Player/entity names in the sidebar are now secondarily sorted by alphabetical order. | ||||
14w30a | Added the stat.talkedToVillager and stat.tradedWithVillager objective criteria. |
||||
? | Added >< to /scoreboard players operation . |
||||
1.8.2 | Added the stat.cauldronFilled , stat.cauldronUsed , stat.armorCleaned , stat.bannerCleaned , stat.brewingstandInteraction , stat.beaconInteraction , stat.dropperInspected , stat.hopperInspected , stat.dispenserInspected , stat.noteblockPlayed , stat.noteblockTuned , stat.flowerPotted , stat.trappedChestTriggered , stat.enderchestOpened , stat.itemEnchanted , stat.recordPlayed , stat.furnaceInteraction , stat.craftingTableInteraction , stat.chestOpened objective criteria. |
||||
1.9 | 15w32a | Added the stat.sneakTime objective criteria. |
|||
15w32b | Added /scoreboard players tag . |
||||
Added the xp , food , and air objective types. |
|||||
15w33a | Added the stat.pickup and stat.drop objective criteria. |
||||
Added the armor , level objective types. |
|||||
15w36a | Added collisionRule . |
||||
15w49a | Added the stat.aviateOneCm objective criteria. |
||||
1.13 | pre7 | Added /scoreboard objectives modify . |
|||
pre8 | Added /scoreboard objectives modify <objectiveName> rendertype hearts , which makes health bars display as hearts, like this: . |
||||
Added /scoreboard objectives modify , which makes health bars display as yellow numbers. |
|||||
Objective names are now text components, not raw strings. | |||||
1.13.1 | 18w31a | Changed the scoreboard operator %= from using % to Math.floorMod . |
|||
1.18 | 21w37a | Removed 16-character length limits for scoreboards, score holders and team names. | |||
Bedrock Edition | |||||
1.7.0 | beta 1.7.0.2 | Added basic scoreboard mechanics. | |||
Added dummy scoreboards. |
Issues relating to “Scoreboard” are maintained on the bug tracker. Report issues there.
Minecraft: How To Display Hearts & Other Statistics Tutorial
FAQ
Why are my hearts not showing in Minecraft?
If your graphics settings have your particle count set to none, hearts might not appear. You can now play hearts to your heart’s content by turning it up.
How do you make a health show in Minecraft?
So, for instance, you would type /scoreboard objectives set display sidebar deaths instead of /scoreboard objectives set display list deaths to create a death counter that will appear on the right side.