Argument types

This page contains a list of all command argument types.
== Java Edition ==
=== brigadier:bool ===
Official examples
* 
* 
=== brigadier:double ===
Each double argument may have a custom minimum and maximum value.
Precision varies throughout number line; the maximum absolute value is about 1.8*10308.
Official examples
* 
* 
* 
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The maximum value of this double argument.
** : The minimum value of this double argument.
=== brigadier:float ===
Each float argument type may have a custom minimum and maximum value.
Precision varies throughout number line; the maximum absolute value is about 3.4*1038.
Official examples
* 
* 
* 
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The maximum value of this float argument.
** : The minimum value of this float argument.
=== brigadier:integer ===
Each integer argument type may have a custom minimum and maximum value.
Maximum range is from −(231) to (231 − 1), or from (−2,147,483,648) to (2,147,483,647).
Official examples
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The maximum value of this integer argument.
** : The minimum value of this integer argument.
=== brigadier:long ===
Note: Although a long argument type is present in brigadier, it is not used by Minecraft.
Each long argument type may have a custom minimum and maximum value.
Maximum range is from −(263) to (263−1), or from (−9,223,372,036,854,775,808) to (9,223,372,036,854,775,807).
Official examples
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The maximum value of this long argument.
** : The minimum value of this long argument.
=== brigadier:string ===
Each string argument type can accept either a single word (no spaces), a quotable phrase (either single word or quoted string), or a greedy phrase (taking the rest of the command as the string argument).
Official examples
Single word
* 
* 
Quotable phrase
* 
* 
* 
Greedy phrase
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The type of this string argument. Can be , , or 
=== minecraft:angle ===
Official examples
* 
* 
* 
=== minecraft:block_pos ===
Official examples
* 
* 
* 
* 
* 
=== minecraft:block_predicate ===
The format of block_predicate parameters is block_id[block_states]{data_tags}, in which block states and data tags can be omitted when they are not needed.
* block_id is required, and it should be in the format of resource location(if namespace isn't set it defaults to minecraft:).
** It can also be the resource location of a block tag prefixed with #, such as #minecraft:planks.
* Block states are inside [], comma-separated and must be properties/values supported by the blocks. They are optional.
** minecraft:stone[doesntexist=purpleberry] is unparseable, because stone doesn't have doesntexist.
** minecraft:redstone_wire[power=tuesday] is unparseable, because redstone_wire's power is a number between 0 and 15.
* Data tags are inside {}. It's optional.
* When test for block, only the states provided are tested.
** If command tests redstone_wire[power=15], it checks only power, but ignores other states such as north.
Official examples
* 
* 
* stone[foo=bar]
* 
* #stone[foo=bar]{baz:nbt}
=== minecraft:block_state ===
The format of block_state parameters is block_id[block_states]{data_tags}, in which block states and data tags can be omitted when they are not needed.
* block_id is required, and it should be in the format of resource location (if namespace isn't set it defaults to minecraft:).
* Block states are inside [], comma-separated and must be properties/values supported by the blocks. They are optional.
** minecraft:stone[doesntexist=purpleberry] is unparseable, because stone doesn't have doesntexist.
** minecraft:redstone_wire[power=tuesday] is unparseable, because redstone_wire's power is a number between 0 and 15.
* Data tags are inside {}. It's optional.
* When placing blocks, any states provided are set, but anything omitted retain their default values, depending on the block type.
** If command sets redstone_wire[power=15], it is set power to 15, but north is a default value (in this case, set to none).
Official examples
* 
* 
* stone[foo=bar]
* foo{bar:baz}
=== minecraft:color ===
Official examples
* 
* 
=== minecraft:column_pos ===
Official examples
* 
* 
* 
=== minecraft:component ===
Official examples
* 
* 
* 
* 
=== minecraft:dimension ===
Official examples
* 
* 
=== minecraft:entity ===
Each entity argument may place limits on the number of entities (single/multiple) selected or the type of entities (player/any entity) selected.
Official examples
* 
* 
* 
* @e[type=foo]
* 
JSON properties in command syntax output
* : The root properties object.
** : The amount of entities that can be selected. Can be or .
** : The target entity type. Can be or . 
=== minecraft:entity_anchor ===
Official examples
* 
* 
=== minecraft:float_range ===
Official examples
* 
* 
* 
* 
* 
=== minecraft:function ===
Official examples
* 
* 
* 
=== minecraft:game_profile ===
Official examples
* 
* 
* 
* 
=== minecraft:gamemode ===
Official examples
* 
* 
=== minecraft:heightmap===
Official examples
* 
* 
=== minecraft:int_range ===
Official examples
* 
* 
* 
* 
* 
=== minecraft:item_predicate ===
The format of item_predicate parameters is item_id{data_tags}, in which data tags can be omitted when not needed.
* item_id is required, and it should be in the format of resource location (if namespace isn't set it defaults to minecraft:).
** It can also be the resource location of a block tag or item tag with the prefix of #, such as #minecraft:planks.
* Data tags are inside {}. It's optional.
** When clear or test for item, only the states provided are tested.
Official examples
* 
* 
* 
* #stick{foo:bar}
=== minecraft:item_slot ===
Official examples
* 
* 
* 
=== minecraft:item_stack ===
The format of item_stack parameters is item_id{data_tags}, in which data tags can be omitted when not needed.
* item_id is required, and it should be in the format of resource location (if namespace isn't set it defaults to minecraft:).
* Data tags are inside {}. It's optional.
* When giving items, any states provided are set, but anything omitted retain their default values, depending on the item type.
Official examples
* 
* 
* stick{foo:bar}
=== minecraft:message ===
Official examples
* 
* 
* 
* 
=== minecraft:nbt_compound_tag ===
Official examples
* {}
* {foo:bar}
=== minecraft:nbt_path ===
An example
* 
** 
*** <the first list element>
**** 
***** 
*** <the second list element>
Official examples
* 
* 
* 
* 
* []
* {foo:bar}
=== minecraft:nbt_tag ===
Official examples
* 
* 
* 
* 
* 
* {foo:bar}
=== minecraft:objective ===
Official examples
* 
* 
* 
=== minecraft:objective_criteria ===
Official examples
* 
* 
* 
=== minecraft:operation ===
Official examples
* =
* 
* 
=== minecraft:particle ===
Official examples
* 
* 
* 
=== minecraft:resource ===
 
Official examples
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The registry ID. 
=== minecraft:resource_key ===
 
Official examples
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The registry ID. 
=== minecraft:resource_location ===
Official examples
* 
* 
* 
=== minecraft:resource_or_tag ===
 
Official examples
* 
* 
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The registry ID. 
=== minecraft:resource_or_tag_key ===
 
Official examples
* 
* 
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The registry ID. 
=== minecraft:rotation ===
Official examples
* 
* 
* 
=== minecraft:score_holder ===
Each score holder argument may specify if it can select only one score holder or multiple score holders.
Official examples
* 
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The amount of score holders that can be selected. Can be or .
=== minecraft:scoreboard_slot ===
Official examples
* 
* 
=== minecraft:swizzle ===
Official examples
* 
* 
=== minecraft:team ===
Official examples
* 
* 
=== minecraft:template_mirror ===
Official examples
* 
* 
=== minecraft:template_rotation ===
Official examples
* 
* 
=== minecraft:time ===
Official examples
* 
* 
* 
* 
JSON properties in command syntax output
* : The root properties object.
** : The minimum time in game ticks.
=== minecraft:uuid ===
Official examples
* 
=== minecraft:vec2 ===
Official examples
* 
* 
* 
* 
=== minecraft:vec3 ===
Official examples
* 
* 
* 
* 
* 
* 
=== Removed ===
==== minecraft:entity_summon ====
Official examples
* 
* 
==== minecraft:item_enchantment ====
Official examples
* 
* 
==== minecraft:mob_effect ====
Official examples
* 
* 
== Bedrock Edition ==
===BlockStateCommandParam===
===CommandIntegerRange===
===CommandFilePath===
===CommandMessage===
===CommandOperator===
===CommandPosition===
===CommandPositionFloat===
===CommandRawText===
===CommandSelector<Actor>===
Represents entities. 
===CommandSelector<Player>===
Represents players. 
===CommandWildcardInt===
Must be a 32-bit integer, or a asterisk () to represent MIN_INT(-2,147,483,648),
===float===
===int===
===Json::Value===
===RelativeFloat===
Must be a float or a tilde and caret notation.
===std::basic_string===
===std::unique_ptr<Command>===
Represents a complete command.
===WildcardCommandSelector<Actor>===
===Enum===
Must be an unquoted string without space.
==History==
== References ==
Category:Commands
es:Tipos de argumento
ja:引数の型
pt:Tipos de argumento
zh:参数类型