The Gamepedia and Fandom account systems have now been merged. If your username is incorrect, you have accounts on both platforms that weren't merged, or you have trouble signing in, please submit a support ticket.

Argument types

From Minecraft Wiki
Jump to: navigation, search

Contents

This page contains a list of all argument types.

Java Edition[edit]

brigadier:bool[edit]

Must be a boolean (either true or false).

brigadier:double[edit]

Must be a Double-precision floating-point format number.

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.

brigadier:float[edit]

Must be a Single-precision floating-point format number.

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.

brigadier:integer[edit]

Must be a 32-bit integer number. And it must be between -2147483648 and 2147483647 (inclusive).

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

brigadier:long[edit]

Must be a 64-bit 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 −(263) to (263−1), or from (−9,223,372,036,854,775,808) to (9,223,372,036,854,775,807).

brigadier:string[edit]

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

minecraft:block_pos[edit]

Must be a block position composed of <x>, <y> and <z>, each of which must be an integer or tilde and caret notation.

minecraft:block_predicate[edit]

It must be a block argument (accepts block tags).

minecraft:block_state[edit]

It must be a block argument (does not accept block tags).

minecraft:color[edit]

Must be a team color (reset or one of the 16 chat colors.)

minecraft:column_pos[edit]

Must be a column coordinates composed of <x> and <z>, each of which must be an integer or tilde and caret notation.

minecraft:component[edit]

Must be a raw JSON text.

minecraft:dimension[edit]

Must be a namespaced ID of a dimension.

minecraft:entity[edit]

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

minecraft:entity_anchor[edit]

Must be either eyes or feet.

minecraft:entity_summon[edit]

Must be a of a namespaced ID of a summonable entity type.

minecraft:float_range[edit]

Must be a range acceptable for float 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 - between 0.1 and 1, inclusive.)

minecraft:function[edit]

It must be a namespaced ID, which refers to a single function, or one prefixed with a #, which refers to a function tag.

minecraft:game_profile[edit]

Must be a collection of game profiles (player profiles), which can be a player name (must be a real one if the server is in online mode), or a player-type target selector.

minecraft:int_range[edit]

Must be a range acceptable for 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 - between 0 and 1, inclusive.)

minecraft:item_enchantment[edit]

Must be a namespaced ID of an enchantment.

minecraft:item_predicate[edit]

It must be a item argument (accepts item tags).

minecraft:item_slot[edit]

Must be a string notation that refer to certain slots in the inventory.

The slot reference is 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 are 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]

It must be a item argument (does not accept item tags).

minecraft:message[edit]

Must be a plain text. Can include spaces as well as target selectors. The game replaces entity selectors in the message with selected entities' names.

minecraft:mob_effect[edit]

Must be a a namespaced ID of a status effect.

minecraft:nbt_compound_tag[edit]

Must be a compound NBT in SNBT format.

minecraft:nbt_path[edit]

Must be an NBT path.

minecraft:nbt_tag[edit]

Must be an NBT tag of any type in SNBT format.

minecraft:objective[edit]

Must be a scoreboard objective name.

minecraft:objective_criteria[edit]

Must be a scoreboard objective criterion.

minecraft:operation[edit]

Must be a arithmetic operator for /scoreboard.
Valid values include = (assignment), += (addition), -= (subtraction), *= (multiplication), /= (floor division), %= (modulus), >< (swapping), < (choosing minimum) and > (choosing maximum).

minecraft:particle[edit]

It must be a namespaced ID of a particle followed by particle parameters that are particle-specific.

  • dust requires three color channel parameters to be set along with the name, representing red, green, and blue, each being a value in the range 0 to 1; and an additional parameter representing size. For example: /particle dust 1.0 0.5 0.5 1.0 creates a pink particle at regular size. If one or more values are greater than 1, the particles change their colors. The greater the values the greater is the range of different colors.
  • block and falling_dust has a parameter in namespaced_ID[block_state=foo] format to specify a block, in which block states can be omitted when unneeded. For example: /particle block minecraft:grass_block[snowy=true]
  • item requires a namespaced ID of an item as a parameter. For example: /particle item minecraft:apple

minecraft:resource_location[edit]

Must be a namespaced ID.

minecraft:rotation[edit]

Must be a rotation, including yaw and pitch, measured in degrees.

  • For the horizontal rotation (yaw), -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.
  • For the vertical rotation (pitch), -90.0 for straight up to 90.0 for straight down.

Tilde notation can be used to specify a rotation relative to the target's previous rotation.

minecraft:score_holder[edit]

Must be a selection of score holders. It may be either a target selector, a player name, a UUID, or * for all score holders.

Each score holder argument may specify if it can select only one score holder or multiple score holders.

minecraft:scoreboard_slot[edit]

Must be a scoreboard display slot.

minecraft:swizzle[edit]

Must be a collection of axes. Axes can be declared in any order, but they cannot duplicate.

minecraft:team[edit]

Must be a team name.

minecraft:time[edit]

Must be a time in Minecraft. It must be a single-precision floating point number suffixed with a unit.

Units:

  • 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 tick after unit conversion. For example. .5d is same as 12000 ticks.

minecraft:uuid[edit]

Must be a UUID in the hyphenated hexadecimal format. Allowed characters include:

  • -
  • A-F
  • a-f
  • 0-9

minecraft:vec2[edit]

Must be a two-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.

minecraft:vec3[edit]

Must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.


Bedrock Edition[edit]

ActorDefinitionIdentifier[edit]

Must be a of a name ID of a summonable entity type.

AgentCommand::Mode[edit]

Represents a subcommand of /agent.

AgentCommands::CollectCommand::CollectionSpecification[edit]

Must be all. Represents all items in /agent collect.

AgentCommands::Direction[edit]

Represents a direction for /agent command.

AutomaticID<Dimension,int>[edit]

Represents a dimension.

Block[edit]

It must be a block id.

BlockSlot[edit]

Must be a string notation that refer to certain slots in the inventory. See #minecraft:item_slot.

bool[edit]

Must be a boolean (either true or false).

ChangeSettingCommand::Setting[edit]

Represents a setting for /changesetting. Must be either allow-cheats or difficulty.

CloneCommand::CloneMode[edit]

Represents a clone mode of /clone. Must be one of mormal, force, and move.

CloneCommand::MaskMode[edit]

Represents a mask mode of /clone. Must be one of replace, masked, and filtered.

CodeBuilderCommand::Action[edit]

Represents a action of /codebuilder. Must be either reset or navigate.

CommandFilePath[edit]

It must be of the format path/to/function/file, which refers to a function located at [behavior_pack]/functions/path/to/function/file.mcfunction.

CommandItem[edit]

It must be a item id or a block id for which items exist.

CommandMessage[edit]

Must be a plain text. Can include spaces as well as target selectors. The game replaces entity selectors in the message with selected entities' names.

CommandOperator[edit]

Must be a arithmetic operator for /scoreboard.
Valid values include = (assignment), += (addition), -= (subtraction), *= (multiplication), /= (floor division), %= (modulus), >< (swapping), < (choosing minimum) and > (choosing maximum).

CommandPosition[edit]

Must be a block position composed of <x>, <y> and <z>, each of which must be an integer or tilde and caret notation.

CommandPositionFloat[edit]

Must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.

CommandRawText[edit]

[more information needed]

CommandSelector<Actor>[edit]

Represents entities. Must be a player name or a target selector.

CommandSelector<Player>[edit]

Represents players. Must be a player name or a target selector.

CommandWildcardInt[edit]

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

Difficulty[edit]

Represents a difficulty level. Must be one of the following:

  • peaceful, p, or 0) for peaceful difficulty.
  • easy, e, or 1 for easy difficulty.
  • normal, n, or 2 for normal difficulty.
  • hard, h, or 3 for hard difficulty.

EffectCommand::Mode[edit]

Represents a mode for /effect. Must be clear.

Enchant::Type[edit]

Must be a name ID of an enchantment.

EquipmentSlot[edit]

Must be a string notation that refer to certain slots in the inventory. See #minecraft:item_slot.

ExecuteCommand::Mode[edit]

Represents a mode for /execute. Must be detect.

FillCommand::FillMode[edit]

Represents a fill mode of /fill. Must be one of destroy, hollow, keep, outline, and replace.

float[edit]

Must be a Single-precision floating-point format number.

GameType[edit]

Represents a gamemode. Must be one of:

int[edit]

Must be a 32-bit integer number.

Json::Value[edit]

Must be a JSON Object.

ListDCommand::DetailMode[edit]

Represents a detail mode for /listd. Must be one of ids, uuids, and stats.

MobEffect[edit]

Must be a a name ID of a status effect.

ObjectiveSortOrder[edit]

Represents a sort order for /scoreboard. Must be either ascending or descending.

PermissionCommand::Action[edit]

Represents an action of /permission command.

PermissionCommand::AvailableCommandPermissionPresets[edit]

Represents a permission of /permission command. Must be one of visitor, member, and operator.

RelativeFloat[edit]

Must be a float or a tilde and caret notation.

ReplaceItemCommand::ReplaceMode[edit]

Represents a replace mode of /replaceitem. Must be either destroy or keep.

ReplaceItemCommand::TargetType[edit]

Represents a target type of /replaceitem. Must be either block or entity.

SaveCommand::Mode[edit]

Represents a mode of /save command. Must be one of hold, query, and resume.

ScoreboardCommand::Action[edit]

Represents an action of /scoreboard command.

ScoreboardCommand::Category[edit]

Represents a category of /scoreboard command. Must be either objective or player.

SetBlockCommand::SetBlockMode[edit]

Represents a setblock mode of /setblock. Must be one of destroy, keep and replace.

std::basic_string<char,std::char_traits<char>,std::allocator<char>>>[edit]

Must be a string. And it must be either a single word (no spaces) or a quoted string.

std::unique_ptr<Command,std::default_delete<Command>>[edit]

Represents a complete command.

StructureFeatureType[edit]

Represents a feature type for /locate command.

TagCommand::Action[edit]

Represents an action of /tag. Must be one of add, remove and list.

TeleportCommand::FacingResult[edit]

Must be facing.

TestForBlocksCommand::Mode[edit]

Represents a mode of /testforblocks command. Must be either masked or all.

TickingAreaCommand::AddAreaType[edit]

Must be circle.

TickingAreaCommand::Mode[edit]

Represents a mode of /tickingarea command.

TickingAreaCommand::TargetDimensions[edit]

Must be all-dimensions.

TimeCommand::Mode[edit]

Represents a mode of /time. Must be one of add, set and query.

TimeCommand::Query[edit]

Represents a time type to query in /time. Must be one of daytime, gametime and day.

TimeCommand::TimeSpec[edit]

Represents a time to set in /time. Must be day, night, noon, midnight, sunrise, or sunset.

TitleCommand::Mode[edit]

Represents a mode of /title.

TitleRawCommand::Mode[edit]

Represents a mode of /titleraw.

WeatherCommand::WeatherRequest[edit]

Must be query.

WeatherCommand::WeatherType[edit]

Represents a weather to set in /weather. Must be one of clear, rain and thunder.

WhitelistCommand::Action[edit]

Represents an action of /whitelist.

WildcardCommandSelector<Actor>[edit]

Must be a selection of score holders. It may be either a target selector, a player name, a scoreboard ID for an entity, or * for all score holders.