![]() |
VOOZH | about |
This page contains a list of all command argument types.
Must be a [Boolean]Boolean (either true or false).
Official examples
truefalseMust be a [Double]Double-precision floating-point number (from -(2-2-52)×21023 (≈-1.8×10308) to (2-2-52)×21023 (≈1.8×10308) ).
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
01.2.5-1-.5-1234.56JSON properties in command syntax output
Must be a [Float]Single-precision floating-point number (from -(2-2-23)×2127 (≈-3.4×1038) to (2-2-23)2×127 (≈3.4×1038) ).
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
01.2.5-1-.5-1234.56JSON properties in command syntax output
Must be a [Int]32-bit integer number (from -2147483648 (-231) to 2147483647 (231-1) ).
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
0123-123JSON properties in command syntax output
Must be a [Long] 64-bit long (from -9223372036854775808 (-263) to 9223372036854775807 (263-1) ).
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
0123-123JSON properties in command syntax output
Must be a 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
wordword_with_underscoresQuotable phrase
"quoted phrase"word""Greedy phrase
wordwords with spaces"and symbols"JSON properties in command syntax output
word, phrase, or greedyMust be a yaw angle, measured in degrees with single-precision floating-point numbers. -180.0 for due north, -90.0 for due east, 0.0 for due south, 90.0 for due west, to 179.9 for just west of due north, before wrapping back around to -180.0. Tilde notation can be used to specify a rotation relative to the execution yaw rotation.
Official examples
0~~-0.5Must be a block position composed of <X>, <Y> and <Z>, each of which must be an integer or a tilde and caret notation.
Official examples
0 0 0~ ~ ~^ ^ ^^1 ^ ^-5~0.5 ~1 ~-5The 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:).
#, such as #minecraft:planks.[], comma-separated and properties and values must be supported by the block or all blocks in the tag. 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.{}. They are optional.redstone_wire[power=15], it checks only power, but ignores other states such as north.Official examples
stoneminecraft:stonestone[foo=bar]#stone#stone[foo=bar]{baz:nbt}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:).[], 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.{}. They are optional.redstone_wire[power=15], it is set power to 15, but north is a default value (in this case, set to none).Official examples
stoneminecraft:stonestone[foo=bar]foo{bar:baz}Must be a column coordinates composed of <X> and <Z>, each of which must be an integer or tilde notation.
Official examples
0 0~ ~~1 ~-2It must be a valid text component.
Official examples
"hello world"""{"text":"hello world"} [""]It must be a resource location, which resolves into a dimension during command execution.
Official examples
minecraft:overworldminecraft:the_netherMust be a player name, a target selector or a UUID.
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
Player0123@e@e[type=foo]dd12be42-52a9-4a91-a8a1-11c01849e498JSON properties in command syntax output
single or multiple.players or entities.Must be either eyes or feet.
Official examples
eyesfeetMust be a range acceptable for single-precision floating-point values. (e.g. 0.1 - exact match of 0.1. ..0.1 - less than or equal to 0.1. 0.1.. - more than or equal to 0.1. 0.1..1 - from 0.1 to 1, both inclusive.)
Official examples
0..5.20-5.4-100.76....100It must be a resource location or one prefixed with a #, which resolves into a function or a function tag during command execution.
Official examples
foofoo:bar#fooSpecifies one or more game profiles (player profiles). Must be a player name (should be a real one if the server is in online mode) or a player-type target selector.
Official examples
Player0123dd12be42-52a9-4a91-a8a1-11c01849e498@eMust be one of the following:
survival for Survival modecreative for Creative modeadventure for Adventure modespectator for Spectator modeNote that "hardcore" is not a valid option, as it is technically not a game mode.
Official examples
survivalcreativeMust be one of world_surface, motion_blocking, motion_blocking_no_leaves, and ocean_floor.
Official examples
world_surfaceocean_floorMust be a range acceptable for 32-bit integer values. (e.g. 0 - exact match of 0. ..0 - less than or equal to 0. 0.. - more than or equal to 0. 0..1 - from 0 to 1, both inclusive.)
Official examples
0..50-5-100....100The format of item_predicate parameters is <item_type>[<list of tests>], in which the list of tests with [] can be omitted when not needed.
<item_type> is required.
minecraft:).#, such as #minecraft:planks.* to match any item type.[] and separated with <separator>.<component_id> - Checks if a component exists.
<component_id> is the ID of a data component.<component_id>=<value> - Matches exact value of a component.
<value> is a representation of component value in SNBT format.<predicate_id>~<value> - Checks an item sub-predicate
<predicate_id> is the ID of an item sub-predicate.<value> is a representation of item sub-predicate in SNBT format.*[damage~{durability:{min:3}}] matches any stack with at least 3 uses left.minecraft:count - Matches the stack size.
count - Always passes.count=<positive_int> - Passes only when the stack size equals to the given value.count~<positive_int> - Passes only when the stack size equals to the given value.count~<int_range> - Passes when the stack size is in the specified range.
<int_range> is an SNBT of {min:<min value>, max:<max value>}. Both min and max are optional.*[count~{max:2}] matches any stack with count <= 2.!.
*[!count=1] matches any stack that has count other than 1.<separator> can be:
| - Logical OR., - Logical AND.| (Logical OR) is higher than , (Logical AND).*[!damage|damage=0, count=1] looks for items without damage component or with 0 damage, and its count must be 1.Official examples
stickminecraft:stick#stickMust be a string notation that refer to a single slot in the inventory, which consists of "slot type" and optional "slot number", in the format of <slot_type> or <slot_type>.<slot_number>. See Slot for details.
Official examples
container.5weaponMust be a string notation or slot source that refer to certain slot(s) in the inventory. The string notation consists of "slot type" and optional "slot number", in the format of <slot_type> or <slot_type>.<slot_number>. Wildcard (*) is accepted. See Slot for details.
Official examples
container.*container.5weaponThe format of item_stack is <item_id>[<list of components>], in which the list of components with [] 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:).[] separated with ,.
<component_id>=<value> - Sets value of a data component.
<component_id> is the ID of a data component.<value> is a representation of component value in SNBT format.!<component_id> - Removes a default data component of the item.Official examples
stickminecraft:stickstick{foo:bar} [sic]Specifies a item modifier with a resource location or in SNBT format. Must be a valid item modifier definition in SNBT format, or a resource location of an existing item modifier (an entry in minecraft:item_modifier registry). For NBT tag, if it is a string tag, the tag is also parsed into a resource location and resolved into an existing item modifier; otherwise, the tag is parsed as a new item modifier definition.
Official examples
foo: bar{function: set_components, components: {"!damage": {}}}{function: set_count, count: 10, add: true}Specifies a predicate with a resource location or in SNBT format. Must be a valid predicate definition in SNBT format, or a resource location of an existing predicate (an entry in minecraft:predicate registry). For NBT tag, if it is a string tag, the tag is also parsed into a resource location and resolved into an existing predicate; otherwise, the tag is parsed as a new predicate definition.
Official examples
foo: bar{condition:weather_check, raining:true}{condition:random_chance, chance: 0.5}Specifies a loot table with a resource location or in SNBT format. Must be a valid loot table definition in SNBT format, or a resource location of an existing loot table (an entry in minecraft:loot_table registry). For NBT tag, if it is a string tag, the tag is also parsed into a resource location and resolved into an existing loot table; otherwise, the tag is parsed as a new loot table definition.
Official examples
foo: bar{pools: [{rolls: 2, entries: [{type: item, weight: 1, name: stick}, {type: item, weight: 1, name: blaze_rod}]}]}It is a greedy phrase string argument (taking the rest of the command as the string argument). Can include spaces as well as target selectors. The game replaces entity selectors in the message with the list of selected entities' names, which is formatted as "name1 and name2" for two entities, or "name1, name2, ... and namen" for n entities.
Official examples
Hello world!foo@eHello @p :)Must be a [NBT Compound / JSON Object] compound NBT in SNBT format.
Official examples
{}{foo:bar}Must be an NBT path.
An example
foo.bar[0]."A [crazy name]".baz.
foo
bar
A [crazy name]
bazOfficial examples
foofoo.barfoo[0][0][]{foo:bar}Must be an NBT tag of any type in SNBT format.
Official examples
00b0xFF0.0"foo"{foo:bar}It must be a single word. (Allowed characters include: -, +, ., _, A-Z, a-z, and 0-9) It resolves into a scoreboard objective during command execution.
Official examples
foo*012Must be a scoreboard objective criterion.
Official examples
foofoo.bar.bazminecraft:fooMust be an arithmetic operator for /scoreboard.
Valid values include = (assignment), += (addition), -= (subtraction), *= (multiplication), /= (floor division), %= (modulus), >< (swapping), < (choosing minimum) and > (choosing maximum).
Official examples
=><It must be in the format of particle_type_id{configuration tags} for particle types with configurations, or the format of particle_type_id for particle types without configurations.
Official examples
foofoo:barparticle{foo:bar}Must be an existing registered resource location in correct registry.
Official examples
foofoo:bar012JSON properties in command syntax output
Must be a resource location, which resolves during command execution into a registry entry in correct registry.
Official examples
foofoo:bar012JSON properties in command syntax output
Must be a resource location for an unregistered content. It is resolved during command execution into the unregistered content, or sent to the client to resolve into a client-side content.
Official examples
foofoo:bar012Must be an existing registered resource location or tag in correct registry.
Official examples
foofoo:bar012#skeletons#minecraft:skeletonsJSON properties in command syntax output
Must be a resource location or a tag, which resolves during command execution into an entry or tag in correct registry.
Official examples
foofoo:bar012#skeletons#minecraft:skeletonsJSON properties in command syntax output
Similar to resouce_location except enables the use of wildcard characters.
* - matches from 0 to any number of characters? - matches exactly one characterOfficial examples
*:* - matches all IDs* - matches everything in the minecraft namespacecustom:folder/*_test_? - matches IDs in the folder subfolder in the custom namespace that end in _test_ followed by one additional character.Must be a rotation consisting of two double number elements, including yaw and pitch, measured in degrees.
Tilde notation can be used to specify a rotation relative to the execution rotation.
Official examples
0 0~ ~~-5 ~5It must be either a target selector, a player name, a UUID, or * for all score holders being tracked by the scoreboard system. Player names don't need to be of a player that is online or a player that exists and can use almost all unicode characters[more information needed].
Each score holder argument may specify if it can select only one score holder or multiple score holders.
Examples
#hidden.topOfficial examples
Player0123*@eJSON properties in command syntax output
single or multiple.Must be a scoreboard display slot.
Official examples
sidebarfoo.barMust contain style information for text component.
Official examples
{"bold": true}Any non-repeating combination of the characters 'x', 'y', and 'z'. Axes can be declared in any order, but they cannot duplicate. (For example, x, xz, zyx, or yz.)
Official examples
xyzxMust be an unquoted string, which resolves into a team during command execution. Allowed characters include: -, +, ., _, A-Z, a-z, and 0-9.
Official examples
foo123Must be a text color except for hexadecimal color codes. See Text component format for details.
Official examples
redgreenMust be one of none, front_back, and left_right.
Official examples
noneleft_rightMust be one of none, clockwise_90, counterclockwise_90, and 180.
Official examples
noneclockwise_90It must be a single-precision floating-point number suffixed with a unit. It must be not less than 0 gameticks. Units include:
d: an in-game day, 24000 gameticks;s: a second, 20 gameticks;t (default and omitable): a single gametick; the default unit.The time is set to the closest integer after unit conversion to gametick. For example. .5d is same as 12000 gameticks.
Official examples
0d0s0t0JSON properties in command syntax output
Must be a UUID in the hyphenated hexadecimal format. Allowed characters include: -, A-F, a-f, and 0-9.
Official examples
dd12be42-52a9-4a91-a8a1-11c01849e498Must be two-dimensional coordinates with double-precision floating-point number elements. Accepts tilde notations.
Official examples
0 0~ ~0.1 -0.5~1 ~-2Must be three-dimensional coordinates with double-precision floating-point number elements. Accepts tilde and caret notations.
Official examples
0 0 0~ ~ ~^ ^ ^^1 ^ ^-50.1 -0.5 .9~0.5 ~1 ~-5Must be a resource location of a summonable entity type.
Official examples
minecraft:pigcowMust be an ID of an enchantment.
Official examples
unbreakingsilk_touchMust be an ID of a status effect.
Official examples
spookyeffectAlso known as BLOCK_STATE_ARRAY.
Must be a blockstate argument as ["<state1>"=<value1>,"<state2>"=<value2>,...]. For example: ["old_leaf_type"="birch","persistent_bit"=true].
Also known as COMPAREOPERATOR.
Must be one of <, <=, =, >=, and >.
Also known as PATHCOMMAND.
It must be of the format path/to/function/file, which resolves into a function located at [behavior_pack]/functions/path/to/function/file.mcfunction during command execution.
Also known as FULLINTEGERRANGE.
Must be a range acceptable for 32-bit integer values. (e.g. 0 - exact match of 0. ..0 - less than or equal to 0. 0.. - more than or equal to 0. 0..1 - from 0 to 1, both inclusive.)
Also known as MESSAGE_ROOT.
It is a greedy phrase string argument (taking the rest of the command as the string argument). Can include spaces as well as target selectors. The game replaces entity selectors in the message with the list of selected entities' names, which is formatted as "name1 and name2" for two entities, or "name1, name2, ... and namen" for n entities.@<player name> can be used to mention a player; @here can be used to mention all players.
Also known as OPERATOR.
Must be an arithmetic operator for /scoreboard.
Valid values include = (assignment), += (addition), -= (subtraction), *= (multiplication), /= (floor division), %= (modulus), >< (swapping), < (choosing minimum) and > (choosing maximum).
Also known as POSITION.
Must be a three-dimensional coordinates composed of <X>, <Y> and <Z>, each of which must be a single-precision floating-point number or tilde and caret notation.
Also known as POSITION_FLOAT.
Must be three-dimensional coordinates with single-precision floating-point number elements. Accepts tilde and caret notations.
Also known as RAWTEXT.
It is a greedy phrase string argument (taking the rest of the command as the string argument).
Also known as SELECTION.
CommandSelector<Actor> is used to specify entities. Must be a player name or a target selector.
CommandSelector<Player> is used to specify players. Must be a player name or a target selector.
Also known as WILDCARDINT.
Must be a 32-bit integer, or an asterisk (*) to represent MIN_INT(-2,147,483,648),
Also known as VAL.
Must be a [Float]Single-precision floating-point number (from -(2-2-23)×2127 (≈-3.4×1038) to (2-2-23)2×127 (≈3.4×1038) ).
Also known as INT.
Must be a [Int]32-bit integer number (from -2147483648 (-231) to 2147483647 (231-1) ).
Also known as JSON_OBJECT.
It must be a JSON [NBT Compound / JSON Object]Object.
Also known as RVAL.
Must be a [Float] float. Accepts tilde notation.
Also known as ID.
Must be a string. And it must be a single word that has no space or a double-quoted string (When quoted, \ can be used to escape characters).
Also known as SLASHCOMMAND.
Represents a complete command.
Also known as WILDCARDSELECTION.
It must be either a target selector, a player name, a unique ID of an entity, or * for all score holders being tracked by the scoreboard system. Player names don't need to be of a player that is online or a player that exists and can use almost all unicode characters[more information needed].
Must be an unquoted string without space.
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.13 | 17w45a | Command arguments are now handled with Brigadier. | |||||
| 1.14 | 19w08a | Now allows single quotes for strings in commands.[1] | |||||
| 1.16 | 20w17a | Added minecraft:uuid argument type. | |||||
| 1.16.2 | 20w29a | Added angle arguments to /spawnpoint and /setworldspawn, with an argument type that is not registered.[2] | |||||
| 20w30a | Added minecraft:angle argument type.
| ||||||
Now /spawnpoint and /setworldspawn use this argument type.[2] | |||||||
| ? | Now minecraft:dimension argument type checks whether the dimension exists during execution instead of parsing. | ||||||
| 1.17 | 20w45a | Now minecraft:angle argument type does not accept NaN or Infinite.[3] | |||||
| 21w10a | Now minecraft:block_pos arguments in /spawnpoint and /setworldspawn require <x> and <z> to be in the range of [-30000000, 30000000), and <y> to be in the range of [-20000000, 20000000) when executing.[4] | ||||||
| 1.18 | 21w37a | Removed 16-character limit in minecraft:objective argument type.[5] | |||||
| 1.18.2 | Pre-release 3 | Added minecraft:resource and minecraft:resource_or_tag argument types.
| |||||
Now minecraft:resource_location is used only for pack contents, while minecraft:resource is used for registry entries. | |||||||
| 1.19 | 22w11a | Now minecraft:item_predicate and minecraft:block_predicate require tag to exist when parsing instead of executing.[6] | |||||
| 22w19a | Added minecraft:template_mirror and minecraft:template_rotation argument types. | ||||||
| 1.19.3 | 22w42a | Added minecraft:resource_key and minecraft:resource_or_tag_key argument types, which are used for reloadable registry entries (i.e. registered pack contents).
| |||||
Now minecraft:resource and minecraft:resource_or_tag are used only for un-reloadable registry entries.
| |||||||
Removed minecraft:mob_effect, minecraft:entity_summon and minecraft:item_enchantment argument types. Replaced by minecraft:resource. | |||||||
| 22w45a | Added minecraft:gamemode argument type. | ||||||
| 1.19.4 | 23w03a | Added min property to minecraft:time argument type.[7]
| |||||
The min value of minecraft:time is always 0 before this update. | |||||||
| 1.19.4-pre1 | Added minecraft:heightmap argument type. | ||||||
| 1.20.3 | 23w46a | Added minecraft:style argument type. | |||||
| 1.20.5 | 24w10a | Added minecraft:item_slots argument type. | |||||
| 26.2 | snap5 | Removed minecraft:color argument type. Replaced by minecraft:team_color | |||||