Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

Argument types

From Minecraft Wiki
Jump to: navigation, search
Information icon.svg
This feature is exclusive to Java Edition.

This page contains a list of all argument types in Java Edition.

List of argument types[edit]

brigadier:bool[edit]

Represents a boolean.

Must be either true or false.

brigadier:double[edit]

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.

brigadier:float[edit]

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.

brigadier:integer[edit]

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).

brigadier:long[edit]

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).

brigadier:string[edit]

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).

minecraft:block_pos[edit]

Represents a block position.

Accepts tilde and caret notations.

minecraft:block_predicate[edit]

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.

minecraft:block_state[edit]

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.

minecraft:color[edit]

Represents a color used in chat formatting.

Can be reset or one of the 16 chat colors.

minecraft:column_pos[edit]

Represents a column position.

Accepts tilde and caret notations.

minecraft:component[edit]

Represents a raw JSON text.

minecraft:dimension[edit]

Represents a Dimension.

Accepts a valid namespaced ID for a dimension.

minecraft:entity[edit]

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.

minecraft:entity_anchor[edit]

Represents the set of positions/rotations of an entity for tilde and caret notations to interpret.

Only accepts eyes or feet.

  • Eyes: Tilde notations will refer to the eye position and caret notations will modify the pitch and yaw[verify]
  • Feet: The default behavior; tilde notations refer to the feet position.

minecraft:entity_summon[edit]

Represents an entity type that can be summoned.

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

minecraft:float_range[edit]

Represents a range acceptable for float values.

General Format:

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

minecraft:function[edit]

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.

minecraft:game_profile[edit]

Represents a collection of game profiles (player profiles).

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

minecraft:int_range[edit]

Represents a range acceptable for integer values.

General Format:

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

minecraft:item_enchantment[edit]

Represents an enchantment.

Accepts a namespaced ID that refers to a valid enchantment.

minecraft:item_predicate[edit]

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.

minecraft:item_slot[edit]

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.

Slot Valid slot_number Mapped index
armor.chest 102
armor.feet 100
armor.head 103
armor.legs 101
weapon 98
weapon.mainhand 98
weapon.offhand 99
container.slot_number 0–53 0-53
enderchest.slot_number 0–26 200-226
hotbar.slot_number 0–8 0-8
inventory.slot_number 0–26 9-35
horse.saddle
400
horse.chest 499
horse.armor 401
horse.slot_number 0–14 500-514
villager.slot_number 0–7 300-307

Then, restrictions will be applied to mapped indexes.

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

minecraft:item_stack[edit]

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.

minecraft:message[edit]

Represents a message with changeable entity reference.

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

minecraft:mob_effect[edit]

Represents a status effect.

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

minecraft:nbt_compound_tag[edit]

Represents a compound NBT in SNBT format.

minecraft:nbt_path[edit]

Represents an NBT/data path.

Format:

  • .: Directory separator. foo.bar means foo's child called bar.
  • []: Array/list index indicator. foo[0] means element 0 of foo; bar[-1] means the last element of bar.
  • "": Escapes , ., etc. in directory names. "quoted strings" may be used if a name of a key needs to be escaped.

minecraft:nbt_tag[edit]

Represents an NBT tag in SNBT format.

minecraft:objective[edit]

Represents a scoreboard objective.

Additionally it enforces the 16-character name length limit.

minecraft:objective_criteria[edit]

Represents a scoreboard objective criterion.

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

minecraft:operation[edit]

Represents arithmetic operators for score comparison, etc.

Valid values include = (assignment), += (addition), -= (subtraction), *= (multiplication), /= (floor division), %= (floor remainder), < (choose minimum) and > (choose maximum).

minecraft:particle[edit]

Represents a particle effect.

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

minecraft:resource_location[edit]

Represents a namespaced ID.

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

minecraft:rotation[edit]

Represents a rotation (pitch and yaw).

minecraft:score_holder[edit]

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.

minecraft:scoreboard_slot[edit]

Represents a scoreboard display slot.

Accepts a string that refers to a display slot.

minecraft:swizzle[edit]

Represents a collection of axes.

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

minecraft:team[edit]

Represents a scoreboard team.

minecraft:time[edit]

Represents a time in Minecraft.

Accepts a single-precision floating point number suffixed with a unit. Units:

  • d: an in-game day, 24000 ticks;
  • s: a second, 20 ticks;
  • t: a single tick; the default unit.

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

minecraft:vec2[edit]

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

Accepts tilde and caret notations.

minecraft:vec3[edit]

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

Accepts tilde and caret notations.