Esta página contiene una lista de todos los tipos de argumentos de comando.
Java Edition[]
brigadier:bool[]
Must be a boolean (either true
or false
).
Ejemplos oficiales
true
false
brigadier:double[]
Must be a Double-precision floating-point format number.
Cada argumento doble puede tener un valor mínimo y máximo personalizado.
La precisión varía a lo largo de la recta numérica; el valor absoluto máximo es aproximadamente 1.8*10308.
Ejemplos oficiales
0
1.2
.5
-1
-.5
-1234.56
Propiedades JSON en la salida de sintaxis del comando
- properties: El objeto de propiedades raíz.
- max: El valor máximo de este doble argumento.
- min: El valor mínimo de este doble argumento.
brigadier:float[]
Must be a Single-precision floating-point format number.
Cada tipo de argumento flotante puede tener un valor mínimo y máximo personalizado.
La precisión varía a lo largo de la recta numérica; el valor absoluto máximo es aproximadamente 3.4*1038.
Ejemplos oficiales
0
1.2
.5
-1
-.5
-1234.56
Propiedades JSON en la salida de sintaxis del comando
- properties: El objeto de propiedades raíz.
- max: el valor máximo de este argumento flotante.
- min: el valor mínimo de este argumento flotante.
brigadier:integer[]
Must be a 32-bit integer number.
Cada tipo de argumento entero puede tener un valor mínimo y máximo personalizado.
El rango máximo es de −(231) a (231 − 1), o de (−2,147,483,648) a (2,147,483,647).
Ejemplos oficiales
0
123
-123
Propiedades JSON en la salida de sintaxis del comando
- properties: El objeto de propiedades raíz.
- max: el valor máximo de este argumento entero.
- min: el valor mínimo de este argumento entero.
brigadier:long[]
Must be a 64-bit long.
Nota: Aunque hay un tipo de argumento largo en brigadier, Minecraft no lo utiliza.
Cada tipo de argumento largo puede tener un valor mínimo y máximo personalizado.
El rango máximo es de −(263) a (263−1), o de (−9,223,372,036,854,775,808) a (9,223,372,036,854,775,807).
Ejemplos oficiales
0
123
-123
Propiedades JSON en la salida de sintaxis del comando
- properties: El objeto de propiedades raíz.
- max: El valor máximo de este largo argumento.
- min: El valor mínimo de este largo argumento.
brigadier:string[]
Must be a string.
Cada tipo de argumento de cadena puede aceptar una sola palabra (sin espacios), una frase entre comillas (ya sea una sola palabra o una cadena entre comillas) o una frase codiciosa (tomando el resto del comando como argumento de cadena).
Ejemplos oficiales
Una sola palabra
word
word_with_underscores
Frase citable
"quoted phrase"
word
""
Frase codiciosa
word
words with spaces
"and symbols"
Propiedades JSON en la salida de sintaxis del comando
- properties: El objeto de propiedades raíz.
- type: El tipo de este argumento de cadena. Puede ser
word
,phrase
, ogreedy
- type: El tipo de este argumento de cadena. Puede ser
minecraft:angle[]
Must be a yaw angle, measured in degrees with float number. -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. Tilde notation can be used to specify a rotation relative to the executor's yaw angle.
Ejemplos oficiales
0
~
~-0.5
minecraft:block_pos[]
It must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation.
Ejemplos oficiales
0 0 0
~ ~ ~
^ ^ ^
^1 ^ ^-5
~0.5 ~1 ~-5
minecraft:block_predicate[]
El formato de los parámetros block_predicate es block_id[block_states]{data_tags}
, en el que los estados de bloque y las etiquetas de datos se pueden omitir cuando no sean necesarios.
block_id
es obligatorio y debe tener el formato ubicación del recurso (si el espacio de nombres no está configurado, el valor predeterminado esminecraft:
).- También puede ser la ubicación del recurso de una etiqueta de bloque con el prefijo
#
, como#minecraft:planks
.
- También puede ser la ubicación del recurso de una etiqueta de bloque con el prefijo
- Los estados de bloque están dentro de
[]
, separados por comas y deben ser propiedades/valores admitidos por los bloques. Son opcionales.minecraft:stone[doesntexist=purpleberry]
no se puede analizar, porquestone
no tienedoesntexist
.minecraft:redstone_wire[power=tuesday]
no se puede analizar, porque elpower
deredstone_wire
es un número entre 0 y 15.
- Etiquetas de datos están dentro de
{}
. Es opcional. - Cuando se prueba el bloque, solo se prueban los estados proporcionados.
- Si el comando prueba
redstone_wire[power=15]
, solo verifica la energía, pero ignora otros estados comonorte
.
- Si el comando prueba
Ejemplos oficiales
stone
minecraft:stone
stone[foo=bar]
#stone
#stone[foo=bar]{baz:nbt}
minecraft:block_state[]
El formato de los parámetros block_state es block_id[block_states]{data_tags}
, en el que los estados de bloque y las etiquetas de datos se pueden omitir cuando no sean necesarios.
block_id
es obligatorio y debe tener el formato ubicación del recurso (si el espacio de nombres no está configurado, el valor predeterminado esminecraft:
).- Los estados de bloque están dentro de
[]
, separados por comas y deben ser propiedades/valores admitidos por los bloques. Son opcionales.minecraft:stone[doesntexist=purpleberry]
no se puede analizar, porquestone
no tienedoesntexist
.minecraft:redstone_wire[power=tuesday]
no se puede analizar, porque elpower
deredstone_wire
es un número entre 0 y 15.
- Etiquetas de datos están dentro de
{}
. Es opcional. - Al colocar bloques, se establecen los estados proporcionados, pero todo lo que se omite conserva sus valores predeterminados, según el tipo de bloque.
- Si el comando establece
redstone_wire[power=15]
, se establecepower
en 15, peronorte
es un valor predeterminado (en este caso , establecido ennone
).
- Si el comando establece
Ejemplos oficiales
stone
minecraft:stone
stone[foo=bar]
foo{bar:baz}
minecraft:color[]
Must be a team color (reset
or one of the 16 chat colors.)
Ejemplos oficiales
red
green
minecraft:column_pos[]
Must be a column coordinates composed of <x> and <z>, each of which must be an integer or tilde notation.
Ejemplos oficiales
0 0
~ ~
~1 ~-2
minecraft:component[]
Must be a raw JSON text.
Ejemplos oficiales
"hello world"
""
{"text":"hello world"}
[""]
minecraft:dimension[]
Must be the resource location of a dimension.
Ejemplos oficiales
minecraft:overworld
minecraft:the_nether
minecraft:entity[]
Must be a player name, a target selector or a UUID.
Cada argumento de entidad puede imponer límites al número de entidades (únicas/múltiples) seleccionadas o al tipo de entidades (jugador/cualquier entidad) seleccionadas.
Ejemplos oficiales
Player
0123
@e
@e[type=foo]
dd12be42-52a9-4a91-a8a1-11c01849e498
Propiedades JSON en la salida de sintaxis del comando
- properties: El objeto de propiedades raíz.
- amount: La cantidad de entidades que se pueden seleccionar. Puede ser
single
omultiple
. - type: el tipo de entidad de destino. Pueden ser
players
oentities
.
- amount: La cantidad de entidades que se pueden seleccionar. Puede ser
minecraft:entity_anchor[]
Must be either eyes
or feet
.
Ejemplos oficiales
eyes
feet
minecraft:float_range[]
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.)
Ejemplos oficiales
0..5.2
0
-5.4
-100.76..
..100
minecraft:function[]
It must be a resource location, which refers to a single function, or one prefixed with a #
, which refers to a function tag.
Ejemplos oficiales
foo
foo:bar
#foo
minecraft:game_profile[]
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.
Ejemplos oficiales
Player
0123
dd12be42-52a9-4a91-a8a1-11c01849e498
@e
minecraft:gamemode[]
MC-Arg desc: Illegal parameters
Ejemplos oficiales
survival
creative
minecraft:heightmap[]
MC-Arg desc: Illegal parameters
Ejemplos oficiales
world_surface
ocean_floor
minecraft:int_range[]
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.)
Ejemplos oficiales
0..5
0
-5
-100..
..100
minecraft:item_predicate[]
El formato de los parámetros item_predicate es item_id{data_tags}
, en el que las etiquetas de datos se pueden omitir cuando no sean necesarias.
item_id
es obligatorio y debe tener el formato ubicación del recurso (si el espacio de nombres no está configurado, el valor predeterminado esminecraft:
).- También puede ser la ubicación del recurso de una etiqueta de bloque o etiqueta de elemento con el prefijo
#
, como#minecraft:planks
.
- También puede ser la ubicación del recurso de una etiqueta de bloque o etiqueta de elemento con el prefijo
- Etiquetas de datos están dentro de
{}
. Es opcional.- Cuando el objeto está claro o se prueba, solo se prueban los estados proporcionados.
Ejemplos oficiales
stick
minecraft:stick
#stick
#stick{foo:bar}
minecraft:item_slot[]
Must be a string notation that refer to certain slots in the inventory.
Ejemplos oficiales
container.5
12
[sic]weapon
minecraft:item_stack[]
El formato de los parámetros item_stack es item_id{data_tags}
, en el que las etiquetas de datos se pueden omitir cuando no sean necesarias.
item_id
es obligatorio y debe tener el formato ubicación del recurso (si el espacio de nombres no está configurado, el valor predeterminado esminecraft:
).- Etiquetas de datos están dentro de
{}
. Es opcional. - Al proporcionar elementos, se establecen los estados proporcionados, pero todo lo que se omite conserva sus valores predeterminados, según el tipo de elemento.
Ejemplos oficiales
stick
minecraft:stick
stick{foo:bar}
minecraft:message[]
Must be a plain text. Can include spaces as well as target selectors. The game replaces entity selectors in the message with the list of selected entities' names, which is formatted as "name1 and name2" for two entities, or "name1, name2, ... and namen" for n entities.
Ejemplos oficiales
Hello world!
foo
@e
Hello @p :)
minecraft:nbt_compound_tag[]
Must be a compound NBT in SNBT format.
Ejemplos oficiales
{}
{foo:bar}
minecraft:nbt_path[]
Must be an NBT path.
Un ejemplo
foo.bar[0]."A [crazy name]".baz.
foo
bar
- <the first list element>
A [crazy name]
baz
- <the second list element>
- <the first list element>
Ejemplos oficiales
foo
foo.bar
foo[0]
[0]
[]
{foo:bar}
minecraft:nbt_tag[]
Must be an NBT tag of any type in SNBT format.
Ejemplos oficiales
0
0b
0l
0.0
"foo"
{foo:bar}
minecraft:objective[]
It must be an valid scoreboard objective name.
Ejemplos oficiales
foo
*
012
minecraft:objective_criteria[]
Must be a scoreboard objective criterion.
Ejemplos oficiales
foo
foo.bar.baz
minecraft:foo
minecraft:operation[]
Must be an arithmetic operator for /scoreboard
.
Valid values include =
(assignment), +=
(addition), -=
(subtraction), *=
(multiplication), /=
(floor division), %=
(modulus), ><
(swapping), <
(choosing minimum) and >
(choosing maximum).
Ejemplos oficiales
=
>
<
minecraft:particle[]
It must be a resource location of a particle followed by particle parameters that are particle-specific.
block
,block_marker
, andfalling_dust
has a parameter inblock_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]
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.dust_color_transition
requires three color channel parameters likedust
representing the start color, a number parameter representing size, and another three color channel parameters representing the end color. For example:/particle dust_color_transition 1.0 0.0 0.0 1.0 0.0 0.0 1.0
creates a particle transitioning from red to blue at regular size.item
requires an item as a parameter in the format ofitem_id{NBT}
, in which NBT can be omitted when unneeded. It appears, however, that NBT values do not change anything in how the particle looks. For example:/particle item minecraft:apple
sculk_charge
requires a float parameter specifying the angle the particle displays at in radians.shriek
requires an int parameter specifying the delay in ticks. For example:/particle shriek 100
creates a shriek particle that doesn't show up until Error de Lua en Módulo:Convertir en la línea 62: attempt to concatenate local 'outputVal' (a nil value). in.vibration
requires a position parameter representing the destination, and an integer parameter representing the duration of the move. For example:/particle vibration 5.0 64.0 0.0 200
creates a particle taking 200 ticks moving from the current position to5.0 64.0 0.0
.
Ejemplos oficiales
foo
foo:bar
particle with options
minecraft:resource[]
Must be a resource location.
Ejemplos oficiales
foo
foo:bar
012
Propiedades JSON en la salida de sintaxis del comando
- properties: El objeto de propiedades raíz.
- registry: el ID del registro.
minecraft:resource_key[]
MC-Arg desc: Illegal parameters
Ejemplos oficiales
foo
foo:bar
012
Propiedades JSON en la salida de sintaxis del comando
- properties: El objeto de propiedades raíz.
- registry: el ID del registro.
minecraft:resource_location[]
Must be a resource location.
Ejemplos oficiales
foo
foo:bar
012
minecraft:resource_or_tag[]
Must be a resource location or a tag.
Ejemplos oficiales
foo
foo:bar
012
#skeletons
#minecraft:skeletons
Propiedades JSON en la salida de sintaxis del comando
- properties: The root properties object.
- registry: The registry ID.
minecraft:resource_or_tag_key[]
MC-Arg desc: Illegal parameters
Ejemplos oficiales
foo
foo:bar
012
#skeletons
#minecraft:skeletons
Propiedades JSON en la salida de sintaxis del comando
- properties: The root properties object.
- registry: The registry ID.
minecraft:rotation[]
Must be a rotation with double number elements, 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 executor's rotation.
Ejemplos oficiales
0 0
~ ~
~-5 ~5
minecraft:score_holder[]
Must be a selection of score holders. It may be either a target selector, a player name, a UUID, or *
for all score holders tracked by the scoreboard. Named player needn't be online, and it even needn't be a real player's name.
Cada argumento del titular de la puntuación puede especificar si puede seleccionar solo un titular de la puntuación o varios titulares de la puntuación.
Ejemplos oficiales
Player
0123
*
@e
Propiedades JSON en la salida de sintaxis del comando
- properties: el objeto de propiedades raíz.
- amount: La cantidad de poseedores de puntajes que se pueden seleccionar. Puede ser
single
omultiple
.
- amount: La cantidad de poseedores de puntajes que se pueden seleccionar. Puede ser
minecraft:scoreboard_slot[]
Must be a scoreboard display slot.
Ejemplos oficiales
sidebar
foo.bar
minecraft:swizzle[]
Any non-repeating combination of the characters 'x', 'y', and 'z'. Axes can be declared in any order, but they cannot duplicate. (For example, x
, xz
, zyx
, or yz
.)
Ejemplos oficiales
xyz
x
minecraft:team[]
Must be a team name of an unquoted string. Allowed characters include: -
, +
, .
, _
, A
-Z
, a
-z
, and 0
-9
.
Ejemplos oficiales
foo
123
minecraft:template_mirror[]
MC-Arg desc: Illegal parameters
Ejemplos oficiales
none
left_right
minecraft:template_rotation[]
MC-Arg desc: Illegal parameters
Ejemplos oficiales
none
clockwise_90
minecraft:time[]
Must be a time in Minecraft. It must be a single-precision floating point number suffixed with a unit. Units include:
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.
Ejemplos oficiales
0d
0s
0t
0
Propiedades JSON en la salida de sintaxis del comando
- properties: The root properties object.
- min: The minimum time in game ticks.
minecraft:uuid[]
Must be a UUID in the hyphenated hexadecimal format. Allowed characters include:
-
A
-F
a
-f
0
-9
Ejemplos oficiales
dd12be42-52a9-4a91-a8a1-11c01849e498
minecraft:vec2[]
Must be a two-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.
Ejemplos oficiales
0 0
~ ~
0.1 -0.5
~1 ~-2
minecraft:vec3[]
Must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.
Ejemplos oficiales
0 0 0
~ ~ ~
^ ^ ^
^1 ^ ^-5
0.1 -0.5 .9
~0.5 ~1 ~-5
Removido[]
minecraft:entity_summon[]
Must be an entity type in the format of resource location of a summonable entity type.
Ejemplos oficiales
minecraft:pig
cow
minecraft:item_enchantment[]
Must be an ID of an enchantment.
Ejemplos oficiales
unbreaking
silk_touch
minecraft:mob_effect[]
Must be an ID of a status effect.
Ejemplos oficiales
spooky
effect
Bedrock Edition[]
Plantilla:Update
BlockStateCommandParam[]
Must be a blockstate argument as ["<state1>":<value1>,"<state2>":<value2>,...]
. For example: ["old_leaf_type":"birch","persistent_bit":true]
.
CommandIntegerRange[]
MC-Arg desc: Illegal parameters
CommandFilePath[]
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
.
CommandMessage[]
Must be a plain text. Can include spaces as well as target selectors. The game replaces entity selectors in the message with the list of selected entities' names, which is formatted as "name1 and name2" for two entities, or "name1, name2, ... and namen" for n entities.@here
can be used to mention all players.
CommandOperator[]
Must be an arithmetic operator for /scoreboard
.
Valid values include =
(assignment), +=
(addition), -=
(subtraction), *=
(multiplication), /=
(floor division), %=
(modulus), ><
(swapping), <
(choosing minimum) and >
(choosing maximum).
CommandPosition[]
It must be a three-dimensional coordinates composed of <x>, <y> and <z>, each of which must be a floating-point number or tilde and caret notation.
CommandPositionFloat[]
Must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.
CommandRawText[]
MC-Arg desc: Illegal parameters
CommandSelector<Actor>[]
Representa entidades. Must be a player name or a target selector.
CommandSelector<Player>[]
Representa a los jugadores. Must be a player name or a target selector.
CommandWildcardInt[]
Debe ser un entero de 32 bits o un asterisco (*
) para representar MIN_INT(-2,147,483,648).
float[]
Must be a Single-precision floating-point format number.
int[]
Must be a 32-bit integer number.
Json::Value[]
Must be a JSON Object.
RelativeFloat[]
Tiener que ser un float o un Notación de tilde y intercalación.
std::basic_string[]
Must be a string.
std::unique_ptr<Command>[]
Representa un comando completo.
WildcardCommandSelector<Actor>[]
Must be a selection of score holders. It may be either a target selector, a player name, a unique ID of an entity, or *
for all score holders tracked by the scoreboard. Named player needn't be online, and it even needn't be a real player's name.
Enumeración[]
Debe ser una cadena sin comillas y sin espacios.
Historial[]
Java Edition | |||||
---|---|---|---|---|---|
1.13 | 17w45a | Los argumentos de comandos ahora se manejan con Brigadier. | |||
1.14 | 19w08a | Ahora permite comillas simples para cadenas en comandos.[1] | |||
1.16 | 20w17a | Se agregó el tipo de argumento minecraft:uuid . | |||
1.16.2 | 20w29a | Se agregaron argumentos de ángulo a /spawnpoint y /setworldspawn , con un tipo de argumento que no está registrado.[2] | |||
20w30a | Se agregó el tipo de argumento minecraft:angle .
| ||||
Ahora /spawnpoint y /setworldspawn usan este tipo de argumento.[2] | |||||
? | Ahora el tipo de argumento minecraft:dimension comprueba si la dimensión existe durante la ejecución en lugar del análisis. | ||||
1.17 | 20w45a | Ahora el tipo de argumento minecraft:angle no acepta NaN o Infinite.[3] | |||
21w10a | Ahora los argumentos minecraft:block_pos en /spawnpoint y /setworldspawn requieren que <x> y <z> estén en el rango de [-30000000, 30000000) y <y> estará en el rango de [-20000000, 20000000) al ejecutar.[4] | ||||
1.18 | 21w37a | Se eliminó el límite de 16 caracteres en el tipo de argumento minecraft:objective .[5] | |||
1.18.2 | Prelanzamiento 3 | Se agregaron tipos de argumentos minecraft:resource y minecraft:resource_or_tag .
| |||
Ahora minecraft:resource_location se usa solo para el contenido del paquete, mientras que minecraft:resource se usa para las entradas del registro. | |||||
1.19 | 22w11a | Ahora minecraft:item_predicate y minecraft:block_predicate requieren que exista una etiqueta al analizar en lugar de ejecutar.[6] | |||
22w19a | Se agregaron tipos de argumentos minecraft:template_mirror y minecraft:template_rotation . | ||||
1.19.3 | 22w42a | Se agregaron tipos de argumentos minecraft:resource_key y minecraft:resource_or_tag_key , que se utilizan para entradas de registro recargables (es decir, contenido del paquete registrado).
| |||
Ahora minecraft:resource y minecraft:resource_or_tag se usan sólo para entradas de registro no recargables. | |||||
Se eliminaron los tipos de argumentos minecraft:mob_effect , minecraft:entity_summon y minecraft:item_enchantment . Reemplazado por minecraft:resource . | |||||
22w45a | Se agregó el tipo de argumento minecraft:gamemode . | ||||
1.19.4 | 23w03a | Se agregó la propiedad min al tipo de argumento minecraft:time .[7]
| |||
El valor mínimo de minecraft:time siempre es 0 antes de esta actualización. | |||||
1.19.4-pre1 | Se agregó el tipo de argumento minecraft:heightmap . |