Argument types

This page contains a list of all command argument types.

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 &minus;(263) to (263&minus;1), or from (&minus;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, in which block states and data tags can be omitted when they are not needed.
 * is required, and it should be in the format of resource location(if namespace isn't set it defaults to ).
 * It can also be the resource location of a block tag prefixed with, such as.
 * Block states are inside, comma-separated and must be properties/values supported by the blocks. They are optional.
 * is unparseable, because  doesn't have.
 * is unparseable, because 's   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, it checks only power, but ignores other states such as.

Official examples

minecraft:block_state
The format of block_state parameters is, in which block states and data tags can be omitted when they are not needed.
 * is required, and it should be in the format of resource location (if namespace isn't set it defaults to ).
 * Block states are inside, comma-separated and must be properties/values supported by the blocks. They are optional.
 * is unparseable, because  doesn't have.
 * is unparseable, because 's   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, it is set   to 15, but   is a default value (in this case, set to  ).

Official examples

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

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:entity_summon
Official examples

minecraft:float_range
Official examples

minecraft:function
Official examples

minecraft:game_profile
Official examples

minecraft:int_range
Official examples

minecraft:item_enchantment
Official examples

minecraft:item_predicate
The format of item_predicate parameters is, in which data tags can be omitted when not needed.
 * is required, and it should be in the format of resource location (if namespace isn't set it defaults to ).
 * It can also be the resource location of a block tag or item tag with the prefix of, such as.
 * Data tags are inside . It's optional.
 * When clear or test for item, only the states provided are tested.

Official examples

minecraft:item_slot
The slot reference is mapped to an integer.


 * {| class="wikitable sortable" data-description="Slot mapping"

!Slot !Valid slot_number !Mapped index
 * align="center"|102
 * align="center"|100
 * align="center"|103
 * align="center"|101
 * align="center"|98
 * align="center"|98
 * align="center"|99
 * align="center"|0-53
 * align="center"|0-53
 * align="center"|0-26
 * align="center"|200-226
 * align="center"|0-8
 * align="center"|0-8
 * align="center"|0-26
 * align="center"|9-35
 * align="center"|400
 * align="center"|499
 * align="center"|401
 * align="center"|0-14
 * align="center"|500-514
 * align="center"|0-7
 * align="center"|300-307
 * }
 * align="center"|98
 * align="center"|99
 * align="center"|0-53
 * align="center"|0-53
 * align="center"|0-26
 * align="center"|200-226
 * align="center"|0-8
 * align="center"|0-8
 * align="center"|0-26
 * align="center"|9-35
 * align="center"|400
 * align="center"|499
 * align="center"|401
 * align="center"|0-14
 * align="center"|500-514
 * align="center"|0-7
 * align="center"|300-307
 * }
 * align="center"|0-26
 * align="center"|9-35
 * align="center"|400
 * align="center"|499
 * align="center"|401
 * align="center"|0-14
 * align="center"|500-514
 * align="center"|0-7
 * align="center"|300-307
 * }
 * align="center"|499
 * align="center"|401
 * align="center"|0-14
 * align="center"|500-514
 * align="center"|0-7
 * align="center"|300-307
 * }
 * align="center"|0-14
 * align="center"|500-514
 * align="center"|0-7
 * align="center"|300-307
 * }
 * align="center"|300-307
 * }

Then, restrictions are applied to mapped indexes.


 * {| class="wikitable sortable" data-description="Restrictions"

!Mapped index !Restrictions
 * 0-53
 * General inventories
 * 98-103
 * Mobs, players, and armor stands
 * 200-226
 * Players
 * 300-307
 * Villagers, pillagers
 * 400-401
 * Horses, donkeys
 * 499-514
 * Donkeys with chest
 * }
 * 400-401
 * Horses, donkeys
 * 499-514
 * Donkeys with chest
 * }
 * }

Official examples

minecraft:item_stack
The format of item_stack parameters is, in which data tags can be omitted when not needed.
 * is required, and it should be in the format of resource location (if namespace isn't set it defaults to ).
 * 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

minecraft:message
Official examples

minecraft:mob_effect
Official examples

minecraft:nbt_compound_tag
Official examples

minecraft:nbt_path
An example



Official examples

minecraft:nbt_tag
Official examples

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_location
Official examples

minecraft:resource_or_tag
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:time
Official examples

minecraft:uuid
Official examples

minecraft:vec2
Official examples

minecraft:vec3
Official examples

CommandSelector
Represents entities.

CommandSelector
Represents players.

CommandWildcardInt
Must be a 32-bit integer, or a asterisk to represent MIN_INT(-2,147,483,648),

RelativeFloat
Must be a float or a tilde and caret notation.

std::unique_ptr
Represents a complete command.

Enum
Must be an unquoted string without space.

引数の種類 参数类型