Commands/tag

From Minecraft Wiki
Jump to: navigation, search
Java Edition.pngMclogo.svg
tag
Restrictions

Operator

First introduced

Java Edition 1.13 (Java Edition 17w45a)

Controls scoreboard tags on individual entities.

Java Edition note: this is distinct from entity type tags, which are applied to entity types and cannot be changed by commands.

Syntax
tag <targets> add <name>
tag <targets> list
tag <targets> remove <name>
Arguments
targets
A target selector.
name
Specifies the name of the tag to be added into or removed from the targets.
Note: There's a 16-character limit for the names applicable through the command, and certain characters, such as :, are prohibited.
Result
Fails if the arguments are not specified correctly.
On success:
  • add — Adds a tag to the targets.
  • list — Lists all tags on the targets.
  • remove — Removes a tag from the targets.