Argument types

These are the argument types in Minecraft: Java Edition.

brigadier:bool
Represents a boolean.

Must be either or.

Official examples

brigadier:double
Represents a Double-precision floating-point format number argument.

Each double argument has 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
Represents a Single-precision floating-point format number argument.

Each float argument type has 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
Represents a 32-bit integer.

Each integer argument type has 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
Represents a 64-bit long.

Note: Although a long argument type is present in brigadier, it is not used by Minecraft.

Each long argument type has 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
Represents 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 Quotable phrase Greedy phrase

JSON properties in command syntax output
 * : The root properties object.
 * : The type of this string argument. Can be, , or

minecraft:block_pos
Represents a block position.

Accepts tilde and caret notations.

Official examples

minecraft:block_predicate
Represents a predicate for a block in a world.

Checks its block state properties and NBT data (for block entities if present). Accepts block tags for block type checking.

Official examples

minecraft:block_state
Represents a predicate for a block state.

Checks for an exact match for a block state and the block entity NBT must include the NBT given.

Official examples

minecraft:color
Represents a color used in chat formatting.

Can be or one of the 16 chat colors.

Official examples

minecraft:column_pos
Represents a column position.

Accepts tilde and caret notations.

Official examples

minecraft:component
Represents a raw JSON text.

Official examples

minecraft:dimension
Represents a Dimension.

Accepts a valid namespaced ID for a dimension.

Official examples

minecraft:entity
Represents a target selector.

Accepts player names, UUIDs or target selectors variables. 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
Represents the set of positions/rotations of an entity for tilde and caret notations to interpret.

Only accepts or.


 * Eyes: Tilde notations will refer to the eye postion and caret notations will modify the pitch and yaw
 * Feet: The default behavior; tilde notations refer to the feet position.

Official examples

minecraft:entity_summon
Represents an entity type that can be summoned.

Accepts an entity type ID. The entity type must be summonable.

Official examples

minecraft:float_range
Represents a range acceptable for float values.

General Format:
 * : Exact match of 0.
 * : Less than or equal to 0.
 * : More than or equal to 0.
 * : Between 0 and 1, inclusive.

Official examples

minecraft:function
Represents one or a collection of functions.

Can accept a namespaced ID, which refers to single functions, or one prefixed with a, which refers to single tags.

Official examples

minecraft:game_profile
Represents a collection of game profiles (player profiles).

It is backed by a target selector that only selects players.

Official examples

minecraft:int_range
Represents a range acceptable for integer values.

General Format:
 * : Exact match of 0.
 * : Less than or equal to 0.
 * : More than or equal to 0.
 * : Between 0 and 1, inclusive.

Official examples

minecraft:item_enchantment
Represents an enchantment.

Accepts a namespaced ID that refers to a valid enchantment.

Official examples

minecraft:item_predicate
Represents a predicate for an item by checking the item type and its NBT data.

Tags are accepted for item type checking. The item NBT data must contain the given NBT data.

Official examples

minecraft:item_slot
Represents a slot in an inventory.

Accepts certain string notations that refer to certain slots in inventories. The slot reference will be 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 will be 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
Represents an item stack.

Does not accept tags. When used to check item matching, the NBT of the item checked against must include the NBT provided by this item.

Official examples

minecraft:message
Represents a message with changeable entity reference.

Accepts a string with spaces and replaces entity selectors in the message with selected entities' names.

Official examples

minecraft:mob_effect
Represents a status effect.

Accepts a namespaced ID that refers to a valid status effect.

Official examples

minecraft:nbt_compound_tag
Represents a compound NBT in SNBT format.

Official examples

minecraft:nbt_path
Represents an NBT/data path.

Format:
 * : Directory separator. means foo's child called bar.
 * : Array/list index indicator. means element 0 of foo;  means the last element of bar.
 * : Escapes, , etc. in directory names. may be used if a name of a key needs to be escaped.

An example



Official examples

minecraft:nbt_tag
Represents an NBT tag in SNBT format.

Official examples

minecraft:objective
Represents a scoreboard objective.

Additionally it enforces the 16-character name length limit.

Official examples

minecraft:objective_criteria
Represents a scoreboard objective criterion.

They are not referenced with namespaced IDs, even though they are stored by ID in the game.

Official examples

minecraft:operation
Represents arithmetic operators for score comparison, etc.

Valid values include  (assignment),   (addition),   (subtraction),   (multiplication),   (floor division),   (floor remainder),  (choose minimum) and  (choose maximum).

Official examples

minecraft:particle
Represents a particle effect.

Accepts a namespaced ID referring to a valid particle followed by particle parameters that are particle-specific.

Official examples

minecraft:resource_location
Represents a namespaced ID.

Accepts a namespaced ID. No other characters allowed, including prefix for tags.

Official examples

minecraft:rotation
Represents a rotation (pitch and yaw).

Official examples

minecraft:score_holder
Represents a selection of score holders.

Each score holder argument may specify if it can select only one score holder or multiple score holders. It may be either backed by a target selector, a literal name reference, or for all 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
Represents a scoreboard display slot.

Accepts a string that refers to a display slot.

Official examples

minecraft:swizzle
Represents a collection of axes.

Axes can be declared in any order, but they cannot duplicate.

Official examples

minecraft:team
Represents a scoreboard team.

Official examples

minecraft:time
Represents a time in Minecraft.

Accepts a single-precision floating point number suffixed with a unit. Units:
 * : an in-game day, 24000 ticks;
 * : a second, 20 ticks;
 * : a single tick; the default unit.

The time will be set to the closest integer tick after unit conversion. For example. is same as 12000 ticks.

Official examples

minecraft:vec2
Represents a two-dimensional vector with floating-point number elements.

Accepts tilde and caret notations.

Official examples

minecraft:vec3
Represents a three-dimensional vector with floating-point number elements.

Accepts tilde and caret notations.

Official examples