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

minecraft:block_state
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
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
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_location
Official examples

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.

WildcardCommandSelector
参数类型