Minecraft:Commands/tag: Difference between revisions
More actions
Fix template calls: add MC/ prefix |
Sync: updated from Minecraft |
||
| Line 1: | Line 1: | ||
{{ | {{for||Tag}} | ||
{{Infobox command | {{Infobox command | ||
| name = tag | | name = tag | ||
| Line 5: | Line 5: | ||
* 2 {{only|java|short=1}} | * 2 {{only|java|short=1}} | ||
* 1 {{only|bedrock|short=1}} | * 1 {{only|bedrock|short=1}} | ||
| others = Cheat only{{only|bedrock|short=1}} | | others = [[Minecraft:Cheat]] only{{only|bedrock|short=1}} | ||
}} | }} | ||
Controls scoreboard | Controls [[Minecraft:scoreboard tag]]s on individual [[Minecraft:entities]]. {{IN|java}}, the number of tags owned by an entity cannot exceed 1024. | ||
{{ | {{el|je}} note: This is distinct from [[Minecraft:tags|entity type tags]], which are applied to [[Minecraft:Entity#Types of entities|entity types]] and can't be changed by commands. | ||
== Syntax == | == Syntax == | ||
| Line 30: | Line 30: | ||
== Arguments == | == Arguments == | ||
{{ | {{argument|targets|entity|entity: target|WildcardCommandSelector<Actor>}} | ||
: Specifies the command's target. | : Specifies the command's target. | ||
: {{ | : {{IN|java}}, {{lcfirst:{{arg desc|je=entity|amount=multiple|type=entities}}}} | ||
: {{ | : {{IN|bedrock}}, must be either a [[Minecraft:Commands#Target_selectors|target selector]], a player name, or <code>*</code> for all score holders. | ||
{{ | {{argument|name|string|name: string|basic_string}} | ||
: Specifies the name of the tag to be added into or removed from the targets. | : Specifies the name of the tag to be added into or removed from the targets. | ||
: {{ | : {{arg desc|je=string|type=word|be=string}} | ||
== Result == | == Result == | ||
| Line 52: | Line 52: | ||
== Output == | == Output == | ||
{{ | {{Output table}} | ||
{{ | {{Output table|edition=je|On fail|0|0|0}} | ||
{{ | {{Output table|cmd=/tag ... add ...|On success|1|1|the number of entities who get a new tag}} | ||
{{ | {{Output table|cmd=/tag ... remove ...|On success|1|1|the number of entities whose tag is remove}} | ||
{{ | {{Output table|cmd=/tag ... list|On success|1|1|the number of all tags the specified entities have}} | ||
{{ | {{Output table|cmd=|edition=be|On fail|0}} | ||
{{ | {{Output table|On success|1}} | ||
{{ | {{Output table}} | ||
== History == | == History == | ||
=== ''Java Edition'' === | === ''Java Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{ | |{{HistoryLine|java}} | ||
|{{HistoryLine||1.13|dev=17w45a|Added {{ | |{{HistoryLine||1.13|dev=17w45a|Added {{cmd|tag|link=none}}.}} | ||
}} | }} | ||
=== ''Bedrock Edition'' === | === ''Bedrock Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{ | |{{HistoryLine|bedrock}} | ||
|{{HistoryLine||1.9|dev=beta 1.9.0.2|Added {{ | |{{HistoryLine||1.9|dev=beta 1.9.0.2|Added {{cmd|tag|link=none}}.}} | ||
}} | }} | ||
== See also == | == See also == | ||
* {{ | * {{cmd|function}} | ||
* {{ | * {{cmd|team}} | ||
== External links == | == External links == | ||
| Line 82: | Line 82: | ||
== Navigation == | == Navigation == | ||
{{ | {{Navbox commands}} | ||
de:Befehl/tag | [[Minecraft:de:Befehl/tag]] | ||
ja:コマンド/tag | [[Minecraft:fr:Commandes/tag]] | ||
pt:Comandos/tag | [[Minecraft:ja:コマンド/tag]] | ||
ru:Команды консоли/tag | [[Minecraft:pt:Comandos/tag]] | ||
zh:命令/tag | [[Minecraft:ru:Команды консоли/tag]] | ||
[[Minecraft:zh:命令/tag]] | |||
Latest revision as of 11:08, 29 July 2026
Template:For Template:Infobox command
Controls Minecraft:scoreboard tags on individual Minecraft:entities. Template:IN, the number of tags owned by an entity cannot exceed 1024.
Template:El note: This is distinct from entity type tags, which are applied to entity types and can't be changed by commands.
Syntax
- Java Edition
tag <targets> add <name>- Adds a tag to the targets.
tag <targets> remove <name>- Removes a tag from the targets.
tag <targets> list- Lists all tags on the targets.
- Bedrock Edition
tag <entity: targets> add <name: string>- Adds a tag to the targets.
tag <entity: targets> remove <name: string>- Removes a tag from the targets.
tag <entity: targets> list- Lists all tags on the targets.
Arguments
- Specifies the command's target.
- Template:IN, Template:Arg desc
- Template:IN, must be either a target selector, a player name, or
*for all score holders.
- Specifies the name of the tag to be added into or removed from the targets.
- 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
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
History
Java Edition
Bedrock Edition
See also
External links
Minecraft:de:Befehl/tag Minecraft:fr:Commandes/tag Minecraft:ja:コマンド/tag Minecraft:pt:Comandos/tag Minecraft:ru:Команды консоли/tag Minecraft:zh:命令/tag