Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/scoreboard

From SAS Gaming Wiki
Revision as of 17:04, 20 November 2025 by imported>MinecraftBedrockPlayer7
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Infobox command

Manages and displays scores for various Minecraft:scoreboard objectives.

Objectives commands

Syntax

scoreboard objectives list
Lists all existing objectives with their display names and criteria.
scoreboard objectives add <objective> <criteria> [<displayName>] (Template:El)
scoreboard objectives add <objective: string> dummy [displayName: string] (Template:El)
Creates a new objective with the given internal objective name, specified criterion, and the optional display name.
scoreboard objectives remove <objective> (Template:El)
scoreboard objectives remove <objective: string> (Template:El)
Deletes the named objective from 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 <slot> [<objective>] (Template:El)
scoreboard objectives setdisplay <list|sidebar> [objective: string] [ascending|descending] (Template:El)
scoreboard objectives setdisplay belowname [objective: string] (Template:El)
Displays score info for the objective in the given slot. Note that the objective parameter is optional; if no objective is provided, this display slot is cleared (returned to its default state). Template:IN, if slot is list or sidebar, there is an additional optional argument ascending|descending to specify the sort order.
scoreboard objectives modify <objective> displayautoupdate <value> (Template:El)
Changes whether or not display names are automatically updated on every score update.
scoreboard objectives modify <objective> displayname <displayName> (Template:El)
Changes the display name of the scoreboard in display slots.
scoreboard objectives modify <objective> numberformat (Template:El)
Resets the default number format of the scoreboard in display slots and in score text components.
scoreboard objectives modify <objective> numberformat blank (Template:El)
Sets the default number format to blank, which indicates that the score is not shown.
scoreboard objectives modify <objective> numberformat fixed <component> (Template:El)
Sets the default number format to fixed, which indicates that the score is replaced by the text component.
scoreboard objectives modify <objective> numberformat styled <style> (Template:El)
Sets the default number format to styled, which indicates that the score is displayed with the selected style.
scoreboard objectives modify <objective> rendertype (hearts|integer) (Template:El)
Changes the display format for scores in the tab player list.

Arguments

Template:Argument

Specifies the internal objective name.
Template:Arg desc

Template:Argument

Specifies the criterion of the new objective.
Template:Arg desc Template:IN, "dummy" is the only criterion currently supported

Template:Argument

Specifies the display name, defaulting to <objective> when unspecified.
Template:IN, must be a Minecraft:raw JSON text. Template:IN, it must be either a single word that isn't a number (allowed characters: Template:Cd, Template:Cd, Template:Cd, and Template:Cd) or a double-quoted string.

Template:Argument

Specifies the slot to display the objective.
Template:Arg desc Valid slots are listed and described in Display Slots.
Template:Arg desc

Template:El: ascending|descending

Specifies the sort order.

Template:El: Template:Argument

Specifies whether display names are auto-updated.
Template:Arg desc

Template:El: Template:Argument

Specifies the display name.
Template:Arg desc

Template:El: Template:Argument

Specifies display text.
Template:Arg desc

Template:El: Template:Argument

Specifies the style.
Template:Arg desc

Template:El: hearts|integer

Specifies the format.

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

Players commands

Syntax

scoreboard players list [<target>] (Template:El)
scoreboard players list [playername: target] (Template:El)
Lists all score holders that are tracked in some way by the scoreboard system. The optional <target> or playername: target parameter is used to list the scores of particular score holders.
scoreboard players get <target> <objective> (Template:El)
Return the scoreboard value. Can be used in conjunction with the Template:Cmd command: Template:Cmd
scoreboard players set <targets> <objective> <score> (Template:El)
scoreboard players set <player: target> <objective: string> <count: int> (Template:El)
Set the targets' scores in the given objective, overwriting any previous score.
scoreboard players add <targets> <objective> <score> (Template:El)
scoreboard players add <player: target> <objective: string> <count: int> (Template:El)
Increments the targets' scores in that objective by the given amount. Template:IN, a negative count subtracts from the score.
scoreboard players remove <targets> <objective> <score> (Template:El)
scoreboard players remove <player: target> <objective: string> <count: int> (Template:El)
Decrements the targets' scores in that objective by the given amount. Template:IN, a negative number adds to the score.
scoreboard players random <player: target> <objective: string> <min: int> <max: int> (Template:El)
Sets the targets' scores in that objective to a random number between min and max (both inclusive).
scoreboard players reset <targets> [<objective>] (Template:El)
scoreboard players reset <player: target> [objective: string] (Template:El)
Deletes score or all scores for the targets. If <objective> is specified, then only that objective is cleared. Otherwise, this applies to all objectives.
Note that this does not merely set the scores to 0: it removes the targets from the scoreboard system (or for the given objective) altogether.
Template:IN, this also disables the target players' ability to use Template:Cmd command (on the given objective if specified).
Template:IN, running scoreboard players reset * will reset the scores of all players, while scoreboard players reset @a will only reset the scores of players online.
scoreboard players test <player: target> <objective: string> <min: wildcard int> [<max: wildcard int>] (Template:El)
Tests if targets' scores are between min and max (defaults to MAX_INT(2,147,483,647)).
scoreboard players enable <targets> <objective> (Template:El)
Enables the target(s) to use the Template:Cmd command on the specified objective. This command accepts non-player entities, but only players are able to actually use the Template:Cmd command. Until this command has been run, players can't trigger that objective. Using the Template:Cmd command disables it again.
Note that if any of the targets did not previously have a score for that scoreboard, this command sets their score to 0.
scoreboard players operation <targets> <targetObjective> <operation> <source> <sourceObjective> (Template:El)
scoreboard players operation <player: target> <targetObjective: string> <operation: operator> <selector: target> <objective: string> (Template:El)
Applies an arithmetic operation altering the targets' scores in the target objective, using sources' scores in the source objective as input.
scoreboard players display name <targets> <objective> (Template:El)
Resets the display name of the targets' scores.
scoreboard players display name <targets> <objective> <text> (Template:El)
Changes the display name of the targets' scores.
scoreboard players display numberformat <targets> <objective> (Template:El)
Resets the number format of the targets' scores.
scoreboard players display numberformat <targets> <objective> blank (Template:El)
Sets the number format of the targets' scores to blank, which indicates that the score is not shown.
scoreboard players display numberformat <targets> <objective> fixed <contents> (Template:El)
Sets the number format of the targets' scores to fixed, which indicates that the score is replaced by the text component.
scoreboard players display numberformat <targets> <objective> styled <style> (Template:El)
Sets the number format of the targets' scores to styled, which indicates that the score is displayed with the selected style.

Arguments

Template:Argument

Specifies the score holder.
Template:Arg desc
Template:IN, only a single score holder can be specified, and * only works for scoreboard players reset (Template:Bug). Template:IN, multiple score holders can be specified.

Template:Argument

Specifies the score holders.
Template:Arg desc

Template:Argument

Specifies the internal objective name.
Template:Arg desc

Template:Argument

Specifies the new score, an amount to add to the score, or an amount to subtract from the score.
Template:Arg desc

Template:El: Template:Argument
Template:El: Template:Argument

Specifies the min value and max value that the random number is between.
Template:Arg desc

Template:El: Template:Argument
Template:El: Template:Argument

Specifies the min value and max value that the random number is between.
Must be a 32-bit integer. And 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.

Template:Argument

Specifies the objective for targets.
Template:Arg desc

Template:Argument

Specifies the source score holders whose scores are used as source inputs.
Template:Arg desc

Template:Argument

Specifies the objective for sources.
Template:Arg desc

Template:Argument

Specifies the operation to be applied.
Template:Arg desc
  • = Assignment: Set target's score to source's score
  • += Addition: Add source's score to target's score
  • -= Subtraction: Subtract source's score from target's score
  • *= Multiplication: Set target's score to the product of the target's and source's scores
  • /= Floor division: Divide target's score by source' scores, and the result is rounded down to an integer.
  • %= Modulus: Divide target's score by source's score, and use the positive remainder to set the target score
  • Template:Cd Swapping: swaps target's score and source's score
  • Template:Cd Choosing minimum: Set target's score to source's score only if source's score is less.
  • Template:Cd Choosing maximum: Set target's score to source's score only if source's score is bigger.
In all cases except Template:Cd, source's score remains unchanged when performing the operation on a target. If target or source isn't tracked by the specified objective, it is set to 0. If more than one score holder is specified as sources, performs the operation once with each source's score. If more than one target score holder is specified, performs the operation for each target one by one.
For /= and %=, if source's score is 0, the command fails Template:In, or succeeds but does not change target's score Template:In.

Template:El: Template:Argument

Specifies the display name.
Template:Arg desc

Template:El: Template:Argument

Specifies display text.
Template:Arg desc

Template:El: Template:Argument

Specifies the style.
Template:Arg desc

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

History

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

See also

External links

Navigation

Template:Navbox commands

Minecraft:de:Befehl/scoreboard Minecraft:es:Comandos/scoreboard Minecraft:ja:コマンド/scoreboard Minecraft:pt:Comandos/scoreboard Minecraft:ru:Команды консоли/scoreboard Minecraft:uk:Команди консолі/scoreboard Minecraft:zh:命令/scoreboard