73 776 bytes añadidos,
16:53 5 jul 2014 {{Construcción}}
Los '''Comandos''' son funciones avanzadas que se activan escribiendo ciertas cadenas de texto.
En un cliente regular de ''Minecraft'' o en el [[stand alone client]], los comandos se introducen a través de la ventana del [[chat]] de ''Minecraft'', que se muestra al pulsar la tecla {{key|T}} (por defecto) o {{key|/}}. Usando la tecla {{key|/}} también se mostrará la ventana de chat e introducirá la barra diagonal que los comandos requieren como prefijo, por lo que es un atajo útil. Al pulsar {{key|Tab}} mientras se introducen comandos irán apareciendo cíclicamente los comandos o argumentos posibles.
Los comandos también se pueden introducir en la consola del [[server]] multijugador, pero '''no''' es necesario que vaya precedido por una {{key|/}} cuando se introducen de esta manera. Los comandos en el [[Bloque de comandos|bloque de comandos]] '''pueden ser''' precedidos por la barra inclinada {{key|/}}, pero no es necesario. Los comandos en un bloque de comandos también pueden requerir un argumento opcional, por lo general el nombre de usuario de un jugador.
La mayoría de los comandos sólo están disponibles en las siguientes situaciones:
* En un [[server]] [[multijugador]] de ''Minecraft'', introducidos por un [[operador]] o [[bloque de comandos]].
* En otros mapas multijugador, introducidos por el jugador que abrió un mapa en [[LAN]] con los trucos habilitados o aloja su propio [[server]] multijugador.
* En el [[singleplayer]], si los trucos se han habilitado en la creación del mundo (a través del botón "Más opciones de Mundo...").
Algunos [[#Comandos de jugador|comandos de jugador]] también están disponibles en un solo jugador, incluso cuando los trucos no están habilitados.
'''Nota:''' En los mundos para un jugador donde los trucos no están habilitados en el menú de creación, se pueden activar de forma temporal mediante la apertura de la sesión de juego actual al juego LAN ({{key|Esc}} -> "Abrir en LAN", y luego el botón "Permitir trucos" y "Iniciar el mundo en LAN"). Realmente no es necesario no estar en una LAN o que otros se unan. Esto no es permanente, pero te permitirá el uso de los comandos hasta que se cierre el mundo, y los cambios que se realicen a través de comandos (objetos creados, etc.) se guardarán con el mundo. Se puede hacer esto cada vez que se empieza a jugar en el mundo otra vez. Hay que tener en cuenta que esto desactiva la pausa en el juego, por lo que mientras está abierto a la red LAN, se debe encontrar un lugar seguro o recargar el mundo antes de utilizar el menú del juego con total seguridad. Recuerda que se puede desactivar el mundo en LAN recargando el mundo.
== Uso ==
=== Leyenda ===
En la lista a continuación, los comandos están escritos siguiendo en este formato:
{| class="wikitable" style="text-align:center"
! Si ves..
! Entonces
|-
| <''corchetes angulares''>
| Es un '''argumento requerido'''.
|-
| [''corchetes cuadrados'']
| Es un '''argumento opcional'''.
|-
| ''cursivas/italics''
| '''Reemplaza esto''' por el valor apropiado.
|-
| texto plano
| '''Introducelo literalmente''' como sale.
|-
| x<nowiki>|</nowiki>y
| '''Selecciona una''' de las opciones.
Las opciones disponibles se muestran separadas por una barra vertical: <nowiki>|</nowiki>
|-
| … (elipsis)
| El argumento consiste en diversas palabras separadas por espacios.
|}
=== {{anchor|Specifying targets}} Selector de objetivos ===
En vez de usar nombres de jugadores, con las siguientes variables o argumentos, se puede seleccionar diferentes tipos de objetivos al mismo tiempo:
{| class="wikitable"
|-
! Variable
! Función
|-
| @p
| El jugador más cercano.
|-
| @r
| Un jugador aleatorio.
|-
| @a
| Todos los jugadores.
|-
| @e
| Todas las entidades.
|-
| ''jugador''
| Sustituyelo por el nombre del jugador/entidad, para referirse a un jugador o entidad en concreto.
|}
=== Argumentos para el selector de objetivos ===
Después de usar un objetivo (<code>@a</code>, <code>@p</code>, <code>@r</code>, o <code>@e</code>) se puede utilizar opcionalmente argumentos.
Esta es la forma de utilizar los argumentos:
<code>@<selector> [<argumento>=<valor>, <argumento>=<valor>, ...]</code><br>
'''Nota''': Hay que asegurarse de '''no''' agregar espacios ni puntos y aparte en el medio de los corchetes.
{| class="wikitable"
! Argumento
! Funcción
|-
| x
| Coordenada X de la zona de búsqueda, siendo el centro de la selección radial y la esquina inicial (al noroeste inferior) para la selección cúbica. Nota, este debe ser un entero (integer).
|-
| y
| Coordenada Y de la zona de búsqueda, siendo el centro de la selección radial y la esquina inicial (al noroeste inferior) para la selección cúbica. Nota, este debe ser un entero.
|-
| z
| Coordenada Z de la zona de búsqueda, siendo el centro de la selección radial y la esquina inicial (al noroeste inferior) para la selección cúbica. Nota, este debe ser un entero.
|-
| (No poner nada)
| Por defecto son las coordenadas del que ejecuta el comando o "0"(cero).
|-
| dx
| Coordenada X de la esquina opuesta para definir un área de búsqueda rectangular. Ten en cuenta, que no puede ser negativo.
|-
| dy
| Coordenada Y de la esquina opuesta para definir un área de búsqueda rectangular. Ten en cuenta, que no puede ser negativo.
|-
| dz
| Coordenada Z de la esquina opuesta para definir un área de búsqueda rectangular. Ten en cuenta, que no puede ser negativo.
|-
| r
| Radio máximo de búsqueda.
|-
| rm
| Radio mínimo de búsqueda.
|-
| rx
| Rotación máxima de x.
|-
| rxm
| Rotación mínima de x.
|-
| ry
| Rotación máxima de y.
|-
| rym
| Rotación mínima de y.
|-
| m
| Modo de juego del jugador. -1 = Todo, 0 = Supervivencia, 1 = Creativo, 2 = Aventura, 3 = Espectador
|-
| c
| Número de objetivos para especificar. Si es negativo, utiliza los objetivos del final de la lista primero.
|-
| l
| Nivel de experiencia máximo de jugadores.
|-
| lm
| Nivel de experiencia mínimo de jugadores.
|-
| score_''name''
| Para el "nombre" del [[Marcadores#Objetivos|objetivo]], la puntuación máxima que este jugador tiene.
|-
| score_''name''_min
| Para el "nombre" del [[Marcadores#Objetivos|objetivo]], la puntuación mínima que este jugador tiene.
|-
| team
| Comprueba si el jugador está en el equipo especificado. Insertar un “!” antes del nombre del equipo comprueba solamente jugadores que no estén en ese equipo. No proporcionar ningún nombre de equipo permite la comprobación de todos los jugadores sin equipo.
|-
| name
| Comprueba si hay jugadores o entidades que llevan ese nombre. Usando =! en lugar de = comprueba sólo los jugadores/entidades que no tienen este nombre. (Ejemplo: name = !Notch)
|-
| type
| Comprueba si hay entidades con este tipo de entidad. (Ejemplo: type = EntityHorse) Esto puede también ser utilizado con =! (descrito anteriormente).
|}
Ejemplo:
<code>@p[x=1,y=30,z=26,r=10,rm=2,m=1,c=3,l=25,lm=3,score_Kills_min=1,score_Deaths=2,team=Red]</code>
Distribución:
'''@p''' - Especifica que sólo al jugador más cercano.
'''x=1''', '''y=30''', '''z=26''' - Establece el centro del radio a x: 1, y: 30 y Z: 26.
'''r=10''' - Establece el radio máximo de búsqueda a 10.
'''rm=2''' - Establece el radio mínimo de búsqueda a 2.
'''m=1''' - Especifica jugadores con modo de juego 1 (creativo).
'''c=3''' - Especifica los tres primeros jugadores en la lista (nota: para @p, el valor predeterminado de c es 1, a diferencia de @e y @a).
'''l=25''' - Especifica todos los jugadores con nivel de experiencia de 25 o menos.
'''lm=3v - Especifica todos los jugadores con nivel de experiencia de 3 o más.
'''score_Kills_min=1''' - Especifica todos los jugadores con al menos 1 "Kills" (puntuación).
'''score_Deaths=2''' - Especifica todos los jugadores con un máximo de 2 "Kills" (puntuación).
'''team=Red''' - Específica todos los jugadores del equipo "Red".
Alternativamente, las coordenadas y de radio máximo (¡pero no mínimo!) se pueden proporcionar de forma más concisa, siempre y cuando sean de los primeros argumentos (hasta cuatro) y sin caracteres que los definan, por ejemplo:
<code>@p['''1''','''30''','''26''','''10''',rm=2,m=1,c=3,l=25,lm=3,score_Kills_min=1,score_Deaths=2,team=Red]</code>
Es idéntico al del ejemplo anterior.
Debido a que el argumento de 'c' utiliza jugadores del final de la lista primero, cuando es negativo, se puede utilizar <code>@p[c =-1]</code> para seleccionar el jugador más lejano en lugar del más cercano (con @e[c=-1] se seleccionará la entidad más alejada).
<code>@e[type=Arrow,r=100,c=-1]</code>
Encuentra el más lejano en un radio de búsqueda de '''100'''.
Si <code>r</code> se especifica junto con <code>dx</code>, <code>dy</code> y/o <code>dz</code>, sólo las entidades dentro de la superposición de ambas regiones de búsqueda se encontrarán.
Hay que tener en cuenta que las distancias <code>dx</code>, <code>dy</code> y <code>dz</code> son '''compensaciones''' de las coordenadas originales <code>x</code>, <code>y</ code> y <code>z</ code>. No actúan como otro conjunto de coordenadas para definir un área cúbica. En otras palabras, no son las coordenadas de la esquina opuesta del cubo que se quiere definir, sino más bien la distancia a la que esta de la coordenada <code> x</code>, <code>y</code> y <code>z</code> original a la esquina opuesta. Por ejemplo, si se desea definir un cubo desde la esquina: <code>x:50</code> <code>y:10</code> <code>z:50</code> para la otra esquina: <code>x:100</ code> <code>y:20</ code> <code>z:200</ code>, se podría escribir los argumentos <code>[x=50, y=10, z=50, dx=50, dy=10, dz=150]</code>, no <code>[x=50, y=10, z=50, dx=100, dy=20, dz=200]</code> porque <code>dx</code>, <code>dy</code> y <code>dz</code>'"añadden"''' a la zona cúbica (50+50=100, 10+10=20, 50+150=200), pero no la definen.
=== Comandos de jugador ===
Estos comandos se pueden utilizar en la ventana de chat por cualquier jugador que tenga permitido conectarse a un [[server]], y también se pueden utilizar en un solo jugador o incluso si no están habilitados los [[Trucos|trucos]].
{| class="wikitable" style="width:100%"
! width="25%" align="center" | Comando
! width="55%" align="center" | Descripción
! width="20%" align="center" | Condición de éxito<ref group="note" name="Exitoso">Las condiciones de éxito de un comando se deben cumplir para que el juego considere al comando "exitoso". Esto se utiliza para determinar una variedad de cosas, tales como la salida de un [[Comparador de Redstone|comparador de redstone]] alimentado por un [[Bloque de Comandos|bloque de comandos]] con un comando. Hay que tener en cuenta que no todos los comandos "exitosos" realmente hacen algo, y no todos los comandos "fracasados" fallan en hacer algo útil.</ref>
|-
|
{{Anchor|help}}
<code>'''help''' [''página''<nowiki>|</nowiki>''nombre del comando'']</code><br>
<code>'''?''' [''página''<nowiki>|</nowiki>''nombre del comando'']</code>
|
Muestra algunos de los comandos disponibles o información adicional al usar ''nombre del comando'' (no se muestran todos). '''Nota:''' los comandos multijugador no aparecen en los juegos de un solo jugador, aunque esté abierto a jugadores en LAN.
|
Tiene éxito si <code>''página''</code> es válido o no se especifican. Técnicamente falla si se especifica <code>''nombre del comando'' </code>, aunque se muestra el uso del comando.
|-
|
{{Anchor|me}}
<code>'''me''' <''acción …''></code>
|
Permite describir una acción de manera narrativa que aparecería en el chat de esta forma: “nombre del jugador” “acción que dice que realiza” (ejemplo: Clappercito escribe: /me se toma un zumo, entonces aparecerá en el chat: *Clappercito se toma un zumo.) Si se utiliza un [[#Selector de objetivos|selector de objetivo]] multi-persona (por ejemplo, <code>@a</code>) con <code>''acción''</code>, la lista de nombres tendrá el siguiente formato: "nombre1 nombre2 nombre3", o "nombre1 nombre2" para dos nombres. Por lo tanto, independientemente del número de los selectores de objetivo que se utilicen en <code>''acción''</code>, este comando sólo dará el mensaje una sola vez.
|
Todos los selectores de objetivo (por ejemplo, <code>@ p</ code>) en <code>''acción''</code> deben evaluarse.
|-
|
{{Anchor|tell}}
<code>'''tell'''<''jugador''> <''mensaje privado …''></code><br>
<code>'''msg'''<'jugador''> <''mensaje privado …''></code><br>
<code>'''w'''<''jugador''> <''mensaje privado …''></code>
|
Se usa para mandar un mensaje privado corto a un jugador en el servidor. Muy útil en servidores si es necesario pedir/decir algo de/a otro jugador sin que otros jugadores lo vean. Si se utiliza el [[#Selector de objetivos|selector de objetivo]] multi-persona (por ejemplo, <code>@a</code>) en ''mensajes privados'', la lista de nombres tendrá el siguiente formato: "nombre1 nombre2 nombre3", o "nombre1 nombre2"para dos nombres. Por lo tanto, independientemente del número de los selectores de destino que se utilicen en <code>''mensaje privado''</code>, este comando sólo dará el mensaje una sola vez - sin embargo, un selector para <code>''jugador''</code> puede enviar un mensaje a varias personas (que tengan parte del mismo nombre).
|
''Todos'' los selectores de objetivo (por ejemplo, <code>@p</code>) con <code>''mensaje privado''</code> debe evaluarse, y el <code>''jugador''</code> debe estar en línea.
|-
|
{{Anchor|trigger}}
<code>'''trigger''' <''objectivo''> <add<nowiki>|</nowiki>set> <''valor''></code>
|
Se utiliza junto con <code>[[#tellraw|/tellraw]]</code> para que los jugadores activen los sistemas hechos por los operadores o los creadores de mapas. El <code>''objetivo''</code> debe ser un objetivo habilitado del marcador del criterio de "trigger". El <code>''valor''</code> dado es o se añade a su valor actual, o se convierte en su nuevo valor, en función de si el segundo argumento es <code>add</code> o <code>set</code>. El valor del objetivo sólo se cambia para el jugador que utiliza el comando.
El <code>trigger</code> se agregará en la 1.8 y está disponible actualmente sólo en las snapshots.
|
El <code>''objetivo''</code> debe contar con los criterios de "trigger" y el jugador que ejecuta el comando debe ser capaz de modificar el <code>''objetivo''</code>.
|}
<references group="note" />
=== Comandos de operador ===
Estos comandos solo se pueden utilizar por [[operador|op]]s (operadores, también conocidos como admins o administradores) desde la consola del servidor, así como a través de la ventana de chat cuando va precedido por el carácter del comando {{key|/}}. Los resultados de estos comandos se transmiten a otros operadores en línea.
Estos comandos también están disponibles en el modo para un jugador con los trucos activados o para los jugadores que alojan un mundo en línea o LAN.
{| class="wikitable" style="width:100%"
! width="25%" align="center" | Comando
! width="55%" align="center" | Descripción
! width="20%" align="center" | Condición de éxito
|-
|
{{Anchor|achievement}}
<code>'''achievement''' give <''stat_name''> [''jugador'']</code>
|
Da a un jugador un logro, y todos los requisitos para los logros previos, o incrementar una estadística en 1. <code>''stat_name''</code> debe utilizar <code>achievement.''achievement_name''</code>, donde'' achievement_name'' es un logro válido (ver [[Marcador]] o [[Logros]] para los nombres válidos), o <code>stat.''statistic_name''</code>, donde'' statistic_name'' es una estadística válida (ver [[Marcador]] para estadísticas válidas). Si el <code>''jugador''</code> no se especifica, el logro/estadística se dará al ejecutor del comando.
|
<code>''stat_name''</code> debe ser un nombre de logro/estadística válida. El <code>''jugador''</code> no es opcional en los bloques de comandos y el jugador debe estar en línea.
|-
|
{{Anchor|blockdata}}
<code>'''blockdata''' <''x''> <''y''> <''z''> <''dataTag''></code>
|
Edits the data tags of the block at the location ''x, y, z''. For more information on data tags, see the [[Commands#Data_tags|''Data tags'' section]].
The <code>blockdata</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''dataTag''</code> must be a valid argument at the block located at ''x, y, z''.
|-
|
{{Anchor|clear}}
<code>'''clear''' [''player''] [''item''] [''data''] [''maxCount''] [''dataTag'']</code>
|
Clears the inventory of <code>''player''</code> (defaults to the executing player if unspecified) of the specified <code>''item'':''data''</code>, with the specified <code>''dataTag''</code>. Does not remove more than <code>''maxCount''</code> items. If no optional tags are specified, the entire inventory is cleared.
The <code>''maxCount''</code> and <code>''dataTag''</code> arguments will be added in 1.8 and are currently available only in the snapshots.
|
At least zero item(s) must be removed, and <code>''player''</code> must be online. Can output a comparator signal if successfully cleared item(s). <code>''data''</code> can be set to -1 to clear regardless of Damage value, and <code>''maxCount''</code> can be set to -1 to clear all of the selected item.
|-
|
{{Anchor|clone}}
<code>'''clone''' <''x1''> <''y1''> <''z1''> <''x2''> <''y2''> <''z2''> <''x''> <''y''> <''z''> [''mode''] [''mode2'']</code>
|
Clones the given area. The destination is (''x'', ''y'', ''z''), where the blocks are placed going into positive coordinate values.
<code>''mode''</code> can be:
* replace - (the default), which copies all blocks.
* masked - which copies all non-air blocks.
* filtered - which removes any unnecessary blocks and replaces them with air.
<code>''mode2''</code> can be:
* move - where it replaces the cloned blocks with air (on filtered you must include what blocks to be filtered out).
* force - which makes the command execute even if the area being cloned overlaps with the area blocks being cloned to (on filtered you must include what blocks to be filtered out).
* normal - (on filtered you must include what blocks to be filtered out).
The <code>clone</code> command will be added in 1.8 and is currently available only in the snapshots.
|
The area being cloned and the area where the cloned blocks are going must both be rendered, must not overlap, and must be within the 32768 block limit (including air blocks)
|-
|
{{Anchor|debug}}
<code>'''debug''' <<nowiki>start|stop</nowiki>></code>
|
Starts a new debug profiling session or stops the session currently running. It notifies about potential performance bottlenecks in the console when active and creates a profiler results file in the folder ''debug'' when stopped.
|
Can only stop if a session is running. Cannot be used in a command block.
|-
|
{{Anchor|defaultgamemode}}
<code>'''defaultgamemode''' <''mode''></code>
|
Sets the default game mode that is shown on the world selection menu. New players that join the world will be put into the default game mode; i.e., if the default game mode is creative, new players will start in creative. This command cannot enable or disable [[Hardcore]] mode.
|
''mode'' must be a valid game mode: <code>survival</code>, <code>creative</code>, <code>adventure</code>, or <code>spectator</code>. The game modes can be abbreviated to "s/c/a/sp" or "0/1/2/3" respectively.
|-
|
{{Anchor|difficulty}}
<code>'''difficulty''' <''new difficulty''></code>
|
Changes the difficulty for as long as the server is running. If the server is restarted, the difficulty will go back to whatever difficulty is set in server.properties.
|
<code>''new difficulty''</code> must be a valid difficulty: <code>peaceful</code>, <code>easy</code>, <code>normal</code>, or <code>hard</code>. The difficulties can be abbreviated to "p/e/n/h" or "0/1/2/3" respectively.
|-
|
{{Anchor|effect}}
<code>'''effect''' <''player''> <''effect''> [''seconds''] [''amplifier''] [''hideParticles'']</code>
|
Gives the targeted player (or entity, via the @e target selector) the specified effect for the specified time (default is 30 seconds). Effects have a limit of 1,000,000 seconds, and the <code>''amplifier''</code> field has a limit of 255. Effect id's can be found on the [[Potion Effects|potion effects]] page. Setting <code>''seconds''</code> to 0 clears this effect. If you put the amplifier to a number of a variably high value, it will not give the desired amplifier. Setting <code>''hideParticles''</code> to true hides effect particles, if value not given, defaults to false.
|
If clearing an effect, the player must have this effect. <code>''effect''</code> must be a valid effect. ''player'' must be online.
|-
|
<code>'''effect''' <''player''> clear</code>
|
Clears all effects on <code>''player''</code> (or entity, via the @e target selector).
|
At least one effect must be removed, and <code>''player''</code> must be online.
|-
|
{{Anchor|enchant}}
<code>'''enchant''' <''player''> <''enchantment ID''> [''level'']</code>
|
Enchants the item that the player is currently holding, according to [[Enchanting#Enchantments|enchantment ID]]. Note that this works within the normal limitations of enchanting items. Enchantments can only be applied to items which can normally receive that specific enchantment. Enchantment levels can not be above the normal highest achievable for the selected enchantment. Conflicting or overpowering enchantment combinations usually prevented are also prevented with this command.
|
The enchantment ID must be valid, the level must be valid for this enchantment (unless the held item is also invalid), the held item must be able to accept this enchantment, the held item cannot have conflicting enchantments, and ''player'' must be online.
|-
|
{{Anchor|execute}}
<code>'''execute''' <''entity''> <''x''> <''y''> <''z''> <''command …''></code>
|
Runs <code>''command''</code> as though it were executed by <code>''entity''</code>, and as though <code>''entity''</code> were located at ''x'', ''y'', ''z''. The command will be run as though the entity has operator-level permission.
The <code>execute</code> command will be added in 1.8 and is currently available only in the snapshots.
|
''entity'' must resolve to one or more valid entities (including players, who must be online if specified by name). ''x'' and ''z'' must be within the range [[World boundary|-30,000,000 to 30,000,000]] (inclusive). ''command'' must execute successfully.
|-
|<code>'''execute''' <''entity''> <''x''> <''y''> <''z''> '''detect''' <''x2''> <''y2''> <''z2''> <''block''> <''data''> <''command …''></code>
|
Runs <code>''command''</code> as though it were executed by <code>''entity''</code>, and as though <code>''entity''</code> were located at ''x'', ''y'', ''z''. It will only run <code>''command''</code> if the specified block is located at ''x2'', ''y2'', ''z2'', starting from ''x'', ''y'', ''z'' for relative coordinates. The command will be run as though the entity has operator-level permission.
The <code>execute</code> command will be added in 1.8 and is currently available only in the snapshots.
|
''entity'' must resolve to one or more valid entities (including players, who must be online if specified by name). ''x'' and ''z'' must be within the range [[World boundary|-30,000,000 to 30,000,000]] (inclusive). The specified block must be found at ''x2'', ''y2'', ''z2''. ''command'' must execute successfully.
|-
|
{{Anchor|fill}}
<code>'''fill''' <''x1''> <''y1''> <''z1''> <''x2''> <''y2''> <''z2''> <''TileName''> [''dataValue''] [''oldBlockHandling''] [''dataTag'']</code>
|
Fills the given area with a block specified by <code>''TileName''</code>, <code>''dataValue''</code>, and <code>''dataTag''</code>. <code>''oldBlockHandling''</code> mode is either <code>destroy</code>, <code>keep</code>, <code>hollow</code>, or <code>outline</code>.
* replace - Destroys any blocks within the target location and replaces them with "TileName", without dropping item entities.
* destroy - Destroys any blocks within the target location, dropping them as item entities, and replacing them with "TileName".
* keep - Only replaces air blocks found in the fill area with "TileName".
* hollow - Wraps only the outer layer of the fill area, creating a square box of "TileName", and replacing all blocks inside of the box area with air. Containers inside of the box will drop their contents, but not their block.
* outline - Wraps only the outer layer of the fill area, creating a square box of "TileName". (Leaves all blocks leftover inside the box area alone and doesn't destroy them)
The <code>fill</code> command will be added in 1.8 and is currently available only in the snapshots.
|
A starting point and an end point must be input followed by a block. Your feet (y-value), will be the point where blocks will begin to fill. Chunks must be loaded and can only fill within a 32768 block limit (including air blocks)
|-
|
{{Anchor|fill replace}}
<code>'''fill''' <''x1''> <''y1''> <''z1''> <''x2''> <''y2''> <''z2''> <''TileName''> <''dataValue''> replace [''replaceTileName''] [''replaceDataValue'']</code>
|
Replaces all blocks matching <code>''replaceTileName''</code> and <code>''replaceDataValue''</code> in a given area with <code>''TileName''</code> and <code>''dataValue''</code>. If <code>''replaceTileName''</code> and <code>''replaceDataValue''</code> are not given, any block will be replaced. Note that the replace operation does not support a <code>''dataTag''</code> argument if <code>''replaceTileName''</code> is given (use above syntax instead to replace any block and have ''dataTag'' support).
The <code>fill</code> command will be added in 1.8 and is currently available only in the snapshots.
|
A starting point and an end point must be input followed by a block. Your feet (y-value), will be the point where blocks will begin to fill. Chunks must be loaded and can only fill within a 32768 block limit (including air blocks)
|-
|
{{Anchor|gamemode}}
<code>'''gamemode''' <''mode''> [''player'']</code>
|
Changes the game mode for <code>''player''</code>. If no <code>''player''</code> is given, it will set your own gamemode.
|
<code>''mode''</code> must be a valid game mode: <code>survival</code>, <code>creative</code>, <code>adventure</code>, or <code>spectator</code>. The game modes can be abbreviated to "s/c/a/sp" or "0/1/2/3" respectively.
<code>''player''</code> must currently be online. <code>''player''</code> is not optional for command blocks.
|-
|
{{Anchor|gamerule}}
<code>'''gamerule''' <''rule name''></code><br>
<code>'''gamerule''' <''rule name''> [''value'']</code>
|
Activates or deactivates the <code>''rule name''</code>. If <code>''value''</code> is not given, displays the current status of <code>''rule name''</code>.
Available rules are:
* commandBlockOutput - Whether [[command block]]s should notify admins when they perform commands
* doDaylightCycle - Whether time progresses
* doFireTick - Whether fire should spread and naturally extinguish
* doMobLoot - Whether mobs should drop items
* doMobSpawning - Whether mobs should naturally spawn
* doTileDrops - Whether blocks should have drops
* keepInventory - Whether the player should keep items in their inventory after death
* mobGriefing - Whether Creepers, Endermen, Ghasts, Withers and Villagers should be able to change blocks or zombies, skeletons, and Zombie Pigmen can pick up items
* naturalRegeneration - Whether the player can regenerate health naturally if their hunger is full enough
The following rules will be added in 1.8 and are currently available only in the snapshots:
* logAdminCommands - Whether to log admin commands to server log
* randomTickSpeed - How often a random tick occurs, such as plant growth, leaf decay, etc. Can be 0 to disable random updates
* sendCommandFeedback - Whether the feedback from commands executed by a player should show up in chat
* showDeathMessages - Whether a message appears in chat when a player dies
Valid <code>''value''</code> for all gamerules are <code>true</code> or <code>false</code>, except randomTickSpeed which can be any non-negative integer.
|
Succeeds in all cases - even absent/invalid <code>''rule name''</code> or a property besides <code>true</code> or <code>false</code>.
|-
|
{{Anchor|give}}
<code>'''give''' <''player''> <''item''> [''amount''] [''data''] [''dataTag'']</code>
|
Spawns <code>''amount''</code> (defaults to 1) of the item defined by <code>''[[data values|item]]''</code> with the specified <code>''data''</code> (defaults to 0) at the location of <code>''player''</code>, using <code>''dataTag''</code> for the "tag" NBT tag. For example typing ''/give John planks 30 1 {display:{Lore:["Wooden planks"]}}'' will give a player called John 30 blocks of Spruce Wood Planks with Lore that says "Wooden planks".
|
<code>''item''</code> must be a valid ID or item name, <code>''amount''</code> must be from 0 to 64, and <code>''player''</code> must be online.
|-
|
{{Anchor|kill}}
<code>'''kill''' [''player''<nowiki>|</nowiki>''entity'']</code>
|
Inflicts {{hp|1000}} void damage to the target, killing the target instantly even if in Creative mode (a high-level Resistance [[effect]] cannot protect the player either). The text "Ouch! That looks like it hurt." will be displayed after executing. Useful when lost, stuck, or to restore health and hunger (assuming you can get your items back easily or the keepInventory gamerule is set to "true"). If <code>''player''<nowiki>|</nowiki>''entity''</code> is not specified, the player running the command will be killed.
The <code>''player''<nowiki>|</nowiki>''entity''</code> argument will be added in 1.8 and is currently available only in the snapshots.
|
<code>''player''<nowiki>|</nowiki>''entity''</code> is not optional in command blocks.
|-
|
{{Anchor|particle}}
<code>'''particle''' <''name''> <''x''> <''y''> <''z''> <''xd''> <''yd''> <''zd''> <''speed''> [''count''] [''player''<nowiki>|</nowiki>''entity'']</code>
|
Spawns [[particles]] in a given area or at a given player/entity.
The <code>particle</code> command will be added in 1.8 and is currently available only in the snapshots.
|
''name'' must be a valid particle name. ''x'' and ''z'' must be within the range [[World boundary|-30,000,000 to 30,000,000]] (inclusive). ''player<nowiki>|</nowiki>entity'' is not optional in command blocks.
|-
|
{{Anchor|playsound}}
<code>'''playsound''' <''sound''> <''player''> [''x''] [''y''] [''z''] [''volume''] [''pitch''] [''minimumVolume'']</code>
|
Plays the selected sound to the selected player. The value of ''sound'' is any event defined in [[sounds.json]] (for example, ''mob.pig.say''). Note that [[Resource Pack]]s may add their own events to sounds.json; the command will successfully play these. File names are ''not'' used by this command; it strictly uses the events defined in sounds.json (which may not even be similar to the original file names and paths), and thus a resource pack adding new sound files must define events for them (this is not necessary when replacing old sounds which are already in defined events). If an event contains multiple sounds, this command will select randomly between them (chances are modified by each sound's "weight" property), just as the game normally would. For example, "mob.pig.say" will play one of several pig sounds at random, because the event has multiple sounds associated with it.
The coordinates ''x'', ''y'', and ''z'' are the coordinates to play the sound from. If prefixed with "~", they will be relative to the player's current location. Note that "~" is shorthand for "~0", and thus "~ ~ ~" can be used as a substitute for the player's current location.
The <code>''volume''</code> argument controls the distance from which a sound may be heard. At values less than 1.0, the sound will be quieter and have a smaller sphere within which it may be heard. At values greater than 1.0, the sound will not actually grow louder, but its audible range (a 16-block radius at 1.0) will be multiplied by ''volume''. There will always be a gradual falloff to silence based on distance from the center of the sphere.
The <code>''minimumVolume''</code> argument controls the volume of the sound for players outside its normal audible sphere. If the player is outside the normal sphere, the sound will instead be centered some short distance (<4 blocks) from the player, and <code>''minimumVolume''</code> will determine its volume.
The <code>''pitch''</code> argument alters both the pitch and the duration of the sound (which means that it's actually changing its speed).
|
<code>''player''</code> must be online, <code>''volume''</code> must be at least 0.0, <code>''pitch''</code> must be between 0.0 and 2.0 (inclusive), <code>''minimumVolume''</code> must be between 0.0 and 1.0 (inclusive), and the player must be able to hear the sound from where it is played.
|-
|
{{Anchor|publish}}
<code>'''publish'''</code>
|
Opens your single-player game for LAN friends to join. This command appears in the singleplayer cheats.
|
Cannot be used in a command block.
|-
|
{{Anchor|replaceitem}}
<code>'''replaceitem block''' [''x''] [''y''] [''z''] <''slot''> <''item''> [''amount''] [''data''] [''dataTag'']</code>
|
Replaces an item in a certain slot of a container block with another item.
The <code>''slot''</code> argument must be <code>slot.container.*</code> (where * is replaced with a number for the correct inventory slot).
The <code>replaceitem</code> command will be added in 1.8 and is currently available only in the snapshots.
|
The block must be a container block and the slot and item arguments must be correct.
|-
|
<code>'''replaceitem entity''' <''selector''> <''slot''> <''item''> [''amount''] [''data''] [''dataTag'']</code>
|
Replaces an item in a certain slot of an entity (player or mob) with another item.
The <code>''slot''</code> argument must be one of (where * is replaced with a number for the correct inventory slot):
* <code>slot.armor.feet|legs|chest|head</code>
* <code>slot.enderchest.*</code>
* <code>slot.horse.armor|chest.*|saddle</code>
* <code>slot.hotbar.*</code>
* <code>slot.inventory.*</code>
* <code>slot.villager.*</code>
* <code>slot.weapon</code>
<code>slot.equipment.*</code> is not currently a valid argument, but mob equipment can be replaced with <code>slot.armor.*</code> or <code>slot.weapon</code> (listed above).
The <code>replaceitem</code> command will be added in 1.8 and is currently available only in the snapshots.
|
The player must be online and the slot and item arguments must be correct.
|-
|
{{Anchor|say}}
<code>'''say''' <''message …''></code>
|
Broadcasts <code>''message''</code> to all players on the server. If a multi-person [[#Target selector|target selector]] (e.g., @a) is used, the list of names is formatted as "name1, name2, and name3", or "name1 and name2" for two names. Therefore, regardless of any target selectors which are used, this command will only output once.
|
All target selectors (e.g., @p) in the message must evaluate.
|-
|
{{Anchor|scoreboard}}
<code>'''scoreboard''' <<nowiki>objectives|players|teams</nowiki>></code>
|
See [[Scoreboard]] for more information. [[Scoreboard#Command reference|Scoreboard-specific commands]].
|
[[Scoreboard#Command reference|Main Article]]
|-
|
{{Anchor|seed}}
<code>'''seed'''</code>
|
Displays the seed. This command can always be used in single-player mode, regardless of whether cheats are enabled or not.
|
Always succeeds (if user is a command block, player in singleplayer, or server op).
|-
|
{{Anchor|setblock}}
<code>'''setblock''' <''x''> <''y''> <''z''> <''TileName''> [''dataValue''] [''oldBlockHandling''] [''dataTag'']</code>
|
Places the block in the ''x'', ''y'' and ''z'' coordinates specified.
|
<code>''TileName''</code> must exist, <code>''dataValue''</code> must exist if specified, <code>''oldBlockHandling''</code> must be either <code>replace</code>, <code>keep</code> or <code>destroy</code> if specified and <code>''dataTag''</code> must evaluate if specified.
|-
|
{{Anchor|setworldspawn}}
<code>'''setworldspawn</code><br>
<code>'''setworldspawn''' <''x''> <''y''> <''z''></code>
|
Sets the world's [[Spawn/Multiplayer Details|spawn]] to the specified coordinates. The worldspawn is where you first spawn and where you respawn if you die and your bed is missing or obstructed. If no coordinates are specified, the world spawn will be set to the executor's current location. Note that a 10 chunk (160 block) radius around the worldspawn is kept loaded at all times. However this only applies if the chunks are already loaded when it is set. Setting it to a place where no player is will NOT cause the area to load. Also compasses (which in minecraft point to the worldspawn rather than north) will not update to the change until you reload the world.
|
''x'', ''y'', and ''z'' must be within the range [[World boundary|-30,000,000 to 30,000,000]] (inclusive). ''x'', ''y'', and ''z'' are not optional in command blocks.
|-
|
{{Anchor|spawnpoint}}
<code>'''spawnpoint'''</code><br>
<code>'''spawnpoint''' <''player''></code><br>
<code>'''spawnpoint''' <''player''> <''x''> <''y''> <''z''></code>
|
Sets the spawnpoint of that player to that position, or to the current position if x y and z are not specified. <code>''player''</code> is optional if ''x y z'' are not specified; will set the spawnpoint of the user to their current location. NOTE: Spawnpoint coordinates must be specified in integers. No decimals.
Sleeping in a bed will also set a spawn point where the bed is, but you can only sleep in beds at night or when it rains.
|
<code>''player''</code> must be online, and ''x'', ''y'', and ''z'' must be within the range [[World boundary|-30,000,000 to 30,000,000]] (inclusive).
|-
|
{{Anchor|spreadplayers}}
<code>'''spreadplayers''' <''x''> <''z''> <''spreadDistance''> <''maxRange''> <''respectTeams''> <''player …''></code>
|
This command allows players to spread out over a long or short distance.
''x'' and ''z'' mark the center of the area across which players are to be spread.
<code>''spreadDistance''</code> is the rough minimum distance players will be spread apart.
<code>''maxRange''</code> is the maximum distance from ''x'', ''z'' where players will be put. Note that this distance is not a circular radius; it represents the maximum distance on either coordinate (thus forming a box ranging from x-maxRange to x+maxRange and z-maxRange to z+maxRange).
<code>''respectTeams''</code> may be true or false, and represents whether players should be moved individually or teams should be kept together.
<code>''player''</code> is the list of players to spread. Names are separated by spaces.
|
''x'' and ''z'' must be within the range [[World boundary|-30,000,000 to 30,000,000]] (exclusive), <code>''spreadDistance''</code> must be at least 0, <code>''maxRange''</code> must be at least 1.0 greater than <code>''spreadDistance''</code>, and there must not be too many players to fit within the area. If <code>''maxRange''</code> is larger than 30,000,000, the command can fail with even one player if it attempts to place them outside the [[world boundary]]). Players do not spread to lava.
|-
|
{{Anchor|summon}}
<code>'''summon''' <''EntityName''> [''x''] [''y''] [''z''] [''dataTag'']</code>
|
Spawns an [[Chunk_format#Entity_Format|entity]]. For example, to create a charged creeper named Powered Creeper at the player's current location:
<code>/summon Creeper ~ ~ ~ {powered:1,CustomName:Powered Creeper}</code>
|
''x'' and ''z'' must fall within the range [[World boundary|-30,000,000 to 30,000,000]] (inclusive), and ''y'' must be at least 0. If coordinates aren't specified the entity will spawn at the player's location (or inside a command block if the command was executed by one).
|-
|
{{Anchor|tellraw}}
<code>'''tellraw''' <''player''> <''raw json message''></code>
|
Sends a [[#Raw_JSON_Text|JSON message]] to specified player(s), allowing formatting and clickable actions in chat text. Color defaults to white and all formatting (bold, italic, etc.) defaults to false.
|
<code>''player''</code> must be online, and the message text must be correctly coded in JSON.
|-
|
{{Anchor|testfor}}
<code>'''testfor''' <''player''> [''dataTag'']</code>
|
Used to test whether the given <code>''player''</code> (or entity, by the @e target selector) could be located, and whether it has all tags specified by <code>''dataTag''</code>. A [[redstone comparator]] as output from a command block with this command will indicate the number of players/entities matched by it. For example, "testfor @a[r=3]" will output the number of players within 3 meters of the command block, and added in [http://minecraft.gamepedia.com/14w02a snapshot 14w02a], "testfor @e[type=Arrow,r=3] {inGround:1b}" will output the number of [[Arrow|arrow]]s stuck in a block within 3 meters.
|
<code>''player''</code> and <code>''dataTag''</code> must be valid and match some entity if specified.
|-
|
{{Anchor|testforblock}}
<code>'''testforblock''' <''x''> <''y''> <''z''> <''TileName''> [''dataValue''] [''dataTag'']</code>
|
Used to test whether a particular block is in the ''x'', ''y'' and ''z'' coordinates specified. Datatags will not work unless a special syntax is used to specify what type of NBT tag is used (s for Short, b for Byte, l for Long, f for Float and d for Double). Also all relevant tags must be included even if they are unused (e.g.: Chest contents must include Slot, id, Damage, and Count.)
|
<code>''TileName''</code> must exist, <code>''dataValue''</code> must exist if specified, and <code>''dataTag''</code> must evaluate if specified.
|-
|
{{Anchor|testforblocks}}
<code>'''testforblocks''' <''x1''> <''y1''> <''z1''> <''x2''> <''y2''> <''z2''> <''x''> <''y''> <''z''> [''mode'']</code>
|
Compares the blocks at two locations in cuboid regions. (''x1'', ''y1'', ''z1'') and (''x2'', ''y2'', ''z2'') specifies the lowest and highest coordinate corners of the source region (the block pattern to check for), and (''x'', ''y'', ''z'') specifies the lowest coordinate corner of the destination region (the region to be checked).
<code>''mode''</code> is <code>masked</code> (air blocks in the source region will match any block in the destination region) or <code>all</code> (all blocks must match exactly, even air).
The <code>testforblocks</code> command will be added in 1.8 and is currently available only in the snapshots.
|
''x1'', ''z1'', ''x2'', ''z2'', ''x'', and ''z'' must fall within the range [[World boundary|-29,999,984 to 29,999,984]] (inclusive). ''y'' must be 0 to 189, and ''y2'' must be 0 to 187.<!-- yeah, weird numbers -->
|-
|
{{Anchor|time}}
<code>'''time''' set <''value''></code>
|
Sets the world time. <code>''value''</code> is an integer between 0 and 24000, inclusive, where 0 is dawn, 6000 midday, 12000 dusk and 18000 midnight. <code>''value''</code> can be greater than 24000; in this case, the time of day wraps around, but the moon's phase is advanced. However, setting the time "backward" (earlier than the current time) does not change the moon. "time set day" sets the time to 1000, and "time set night" sets the time to 13000.
|
<code>''value''</code> must be 0 or positive, or <code>day</code> or <code>night</code>.
|-
|
<code>'''time''' add <''value''></code>
|
Increments the world time, as above.
|
<code>''value''</code> must be 0 or positive. The daytime wraps, and the moon's phase advances; adding 24000 will advance the moon's phase by one day.
|-
|
{{Anchor|title}}
<code>'''title''' <''player''> clear</code>
|
Removes title from <code>''player''</code>.
The <code>title</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''player''</code> must be a valid online player.
|-
|
<code>'''title''' <''player''> reset</code>
|
Resets subtitle, fadeIn time, stay time, and fadeOut time for <code>''player''</code>.
The <code>title</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''player''</code> must be a valid online player.
|-
|
<code>'''title''' <''player''> subtitle <''raw json title''></code>
|
Sets the subtitle text for <code>''player''</code>. This is only displayed if a title is on the player's screen at the same time (can be empty).
The <code>title</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''player''</code> must be a valid online player. <code>''raw json title''</code> must be a single word of text (not delimited by curly brackets) or a valid json specification.
|-
|
<code>'''title''' <''player''> times <''fadeIn''> <''stay''> <''fadeOut''></code>
|
Sets the time in game ticks for title (and optional subtitle) to fade in, persist, and fade out, for <code>''player''</code>.
The <code>title</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''player''</code> must be a valid online player.
|-
|
<code>'''title''' <''player''> title <''raw json title''></code>
|
Sets the title text for <code>''player''</code> and shows the title (optionally, with prespecified subtitle). Titles are displayed in the middle of your screen.
The <code>title</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''player''</code> must be a valid online player. <code>''raw json title''</code> must be a single word of text (not delimited by curly brackets) or a valid json specification.
|-
|
{{Anchor|toggledownfall}}
<code>'''toggledownfall'''</code>
|
Toggles rain and snow.
|
Always succeeds.
|-
|
{{Anchor|tp}}
<code>'''tp''' [''target player''] <''destination player''></code>
|
Teleports <code>''target player''</code> (or entity, by the @e target selector) to the location of <code>''destination player''</code> (or entity, by the @e target selector). If no player/entity is specified, it will teleport yourself.
|
<code>''target player''</code> is not optional in command blocks. Both players must be online.
|-
|
<code>'''tp''' [''target player''] <''x''> <''y''> <''z''> [<''y-rot''> <''x-rot''>]</code>
|
Teleports <code>''target player''</code> (or entity, by the @e target selector – or yourself if no player/entity is specified) to coordinates x,y,z. Can also relatively move the player/entity by adding the '''~''' character before the coordinate value. For example typing ''/tp John ~3 64 ~3'' will teleport a player called John 3 blocks away from his current x and z, and to y 64. Additionally, ''y-rot'' and ''x-rot'' may optionally be used to specify the yaw and pitch in degrees - these also accept '''~'''.
The rotation arguments will be added in 1.8 and are currently available only in the snapshots.
|
''x'' and ''z'' must fall within the range [[World boundary|-30,000,000 to 30,000,000]] (exclusive), and ''y'' must be at least 0. ''target player'' is not optional in command blocks, and the player must be online.
|-
|
{{Anchor|weather}}
<code>'''weather''' <<nowiki>clear|rain|thunder</nowiki>> [''duration in seconds'']</code>
|
Changes the weather for the specified duration.
|
<code>''duration in seconds''</code> must be at least 1, and cannot be greater than 1,000,000, and a valid weather condition must be provided.
|-
|
{{anchor|worldborder add}}
<code>'''worldborder''' add <''sizeInBlocks''> [''timeInSeconds'']</code>
|
Adds blocks to the current size of the [[world border]].
Can use negative (-) numbers to subtract the size of the border.
The <code>worldborder</code> command will be added in 1.8 and is currently available only in the snapshots.
|
Always succeeds even if the <code>worldborder<code> isn't set.
|-
|
{{Anchor|worldborder|worldborder center}}
<code>'''worldborder''' center <''x''> <''z''></code>
|
Sets the center of the [[world border]].
The <code>worldborder</code> command will be added in 1.8 and is currently available only in the snapshots.
|
''x'' and ''z'' must fall within the range [[World boundary|-30,000,000 to 30,000,000]] (exclusive).
|-
|
{{anchor|worldborder damage amount}}
<code>'''worldborder''' damage amount <''damagePerBlock''></code>
|
Sets the amount of damage inflicted per second per block past the [[world border]] buffer (defaults to 0.2). For example, if <code>''damagePerBlock''</code> is 0.1, a player 5 blocks outside the world border buffer will take 0.5 damage per second (damage less than half a heart might not change the visual health display, but will still accumulate).
The <code>worldborder</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''damagePerBlock''</code> must be at least 0.0.
|-
|
{{anchor|worldborder damage buffer}}
<code>'''worldborder''' damage buffer <''sizeInBlocks''></code>
|
Sets the buffer distance outside the [[world border]] before damage begins to be inflicted (defaults to 5.0).
The <code>worldborder</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''sizeInBlocks''</code> must be at least 0.0.
|-
|
{{Anchor|worldborder set}}
<code>'''worldborder''' set <''sizeInBlocks''> [''timeInSeconds'']</code>
|
Sets the diameter of the [[world border]]. <code>''sizeInBlocks''</code> is the new diameter. <code>''timeInSeconds''</code> is the number of seconds it should take for the border to move from its previous location to the new location. If <code>''timeInSeconds''</code> is not specified, the diameter changes immediately.
The <code>worldborder</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''sizeInBlocks''</code> must fall within the range 1 to 60,000,000 (inclusive).
|-
|
{{anchor|worldborder warning distance}}
<code>'''worldborder''' warning distance <''blocks''></code>
|
Sets the distance inside the [[world border]] where visual warning of world border proximity begins (defaults to 5).
The <code>worldborder</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''blocks''</code> must be at least 0.
|-
|
{{anchor|worldborder warning time}}
<code>'''worldborder''' warning time <''seconds''></code>
|
Sets the time before a moving [[world border]] intersects the player when visual warning of the world border starts (defaults to 15). For example, if <code>''seconds''</code> is 5, players will get a visual warning when the moving world border is 5 seconds or less away from passing their position.
The <code>worldborder</code> command will be added in 1.8 and is currently available only in the snapshots.
|
<code>''seconds''</code> must be at least 0.
|-
|
{{Anchor|xp}}
<code>'''xp''' <''amount''> [''player'']</code>
|
Gives the specified user the given number of orbs. Maximum is 2,147,483,647 per command. Negative amounts may not be used to remove experience points.
|
<code>''amount''</code> can be at most 2,147,483,647. <code>''player''</code> is not optional in command blocks, and player must be online.
|-
|
<code>'''xp''' <''amount''>L [''player'']</code>
|
Gives <code>''player''</code> the <code>''amount''</code> number of experience levels. Maximum is 2,147,483,647 — if a player is given levels pushing them past this limit, they get reset to 0. Negative amounts may be used to remove experience levels.
|
<code>''amount''</code> must be between -2,147,483,648 and 2,147,483,647, inclusive. <code>''player''</code> is not optional in command blocks, and player must be online.
|}
=== Comandos multijugador ===
Estos comandos sólo están disponibles en el modo [[Multijugador|multijugador]], y son utilizables por [[op]]s (operadores) usando la consola del servidor, así como a través de la ventana de chat cuando va precedido por el carácter del comando {{key|/}} .
Ninguno de estos comandos hacen uso del [[#Selector de objetivos|selector de objetivos]] y, con la excepción del comando {{cmd|list}}, ninguno de estos comandos se puede ejecutar con un bloque de comandos.
Muchos de estos comandos se puede utilizar en jugadores que nunca han estado en el servidor, o incluso en nombres que no estén (o no pueden estar) registrados en cuentas de ''Minecraft''.
Many of these commands can be used on players who have never been to the server, or even on names which are not (or cannot be) registered as ''Minecraft'' accounts.
{| class="wikitable" style="width:100%"
! width="25%" align="center" | Comando
! width="55%" align="center" | Descripción
! width="20%" align="center" | Condiciones de éxito
|-
| {{Anchor|ban}}<code>'''ban''' <''nombre''> [''razón …'']</code>
| Inscribe en la lista negra el ''nombre'' del jugador desde el servidor de manera que ya no pueden conectarse. '''Nota''': El ban reemplaza cualquier lista blanca en su lugar.
| Siempre exitoso.
|-
| {{Anchor|ban-ip}}<code>'''ban-ip''' <''dirección''<nowiki>|</nowiki>''nombre''> [''razón …'']</code>
| Bloquea la entrada a los jugadores añadiendo sus ips a la lista negra.
| La ''dirección'' debe ser una IP válida o usando el ''nombre'' del jugador, este debe estar en línea.
|-
| {{Anchor|banlist}}<code>'''banlist''' [''ips''<nowiki>|</nowiki>''jugador'']</code>
| Muestra la lista negra de bloqueados (baneados) por direcciones IP o nombres.
| Siempre exitoso.
|-
| {{Anchor|deop}}<code>'''deop''' <''jugador''></code>
| Revoca el puesto de Op (operador) del jugador indicado.
| Siempre exitoso.
|-
| {{Anchor|kick}}<code>'''kick''' <''jugador''> [''razón …'']</code>
| Fuerza la desconexión del ''jugador'' indicado del servidor, pudiendo darle de manera opcional una ''razón'' del porqué.
| El ''jugador'' debe estar en línea.
|-
| {{Anchor|list}}<code>'''list'''</code>
| Muestra en el chat todos los jugadores conectados, también sirve tecla {{key|Tab}}.
|-
| {{Anchor|op}}<code>'''op''' <''jugador''></code>
| Hace [[Operador|Op]] (operador) al jugador indicado en el servidor.
| Siempre exitoso..
|-
| {{Anchor|pardon}}<code>'''pardon''' <''nombre''></code>
| Saca de la lista negra al ''nombre'' del ex-jugador indicado, permitiéndole volver a conectarse al server.
| Siempre exitoso.
|-
| {{Anchor|pardon-ip}}<code>'''pardon-ip''' <''dirección''></code>
| Saca de la lista negra esa ''dirección'' IP indicada, permitiendo a los los ex-jugadores con esa dirección IP volver a conectarse.
| La ''dirección' debe ser una IP válida.
|-
| {{Anchor|save-all}}<code>'''save-all'''</code>
| Fuerza al servidor a guardar en el disco todos los cambios pendientes del mundo.
| Siempre exitoso.
|-
| {{Anchor|save-off}}<code>'''save-off'''</code>
| Deshabilita el guardado automático, todos los cambios posteriores temporalmente no serán guardados.
| Siempre exitoso.
|-
| {{Anchor|save-on}}<code>'''save-on'''</code>
| Habilita el guardado automático, que es el estado normal de funcionamiento.
| Siempre exitoso.
|-
| {{Anchor|setidletimeout}}<code>'''setidletimeout''' <''minutos antes de echarlo''></code>
| Da un tiempo de margen al jugador antes de ser desconectado del servidor.
| Siempre exitoso.
|-
| {{Anchor|stop}}<code>'''stop'''</code>
| Guarda todos los cambios en el servidor y después lo apaga.
| Siempre exitoso.
|-
| {{Anchor|whitelist}}<code>'''whitelist''' <<nowiki>add|remove</nowiki>> <''jugador''></code>
| Añade (o quita) al jugador especificado a la lista blanca.
| Siempre exitoso.
|-
| <code>'''whitelist''' list</code>
| Muestra la lista de jugadores de la lista blanca.
| Siempre exitoso.
|-
| <code>'''whitelist''' <<nowiki>on|off</nowiki>></code>
| Habilita o deshabilita el uso de la lista blanca, que sirve, cuando se activa, para dejar paso sólo a los jugadores que en ella se encuentran. '''Nota:''' El operador del servidor ''siempre'' podrá conectarse aunque no aparezca en la lista.
| Siempre exitoso.
|-
| <code>'''whitelist''' reload</code>
| Recarga la lista blanca de los jugadores del disco duro usando el archivo <code>white-list.txt</code> (para la 1.7.5 o anterior) o <code>whitelist.json</code> (para la 1.7.6 o posterior) (se usa cuando la lista ha sido modificada fuera del ''Minecraft'').
| Siempre exitoso.
|-
|}
== Data tags ==
[[NBT format|NBT tags]] can be specified for items and entities created with the {{cmd|give}}, {{cmd|summon}} and other commands. Data tags are [[wikipedia:Data structure|data structures]]. The format is [[wikipedia:JSON|JSON]], although it is not strict ([https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient%28boolean%29 lenient]). The data is represented as a comma separated list of pairs. Each pair has the format <code><key>:<value></code>. The key is the name of the NBT tag and the value is the data that should be assigned to it. Tag names are case-sensitive, and whitespace outside keys or values is ignored.
The value can be different types:
* '''String''' is a piece of text, can be wrapped with double-quotes. Double quotes have to be used if the String contains commas, curly braces or square brackets. To use double-quotes inside Strings, the quote is escaped by a backslash (<code>\"</code>). When using most commands, escaping is disabled (except for double quotes) and keys must not be quoted (probably a bug [https://mojang.atlassian.net/browse/MC-37661]). This causes an issue where trailing backslashes do not work (as do any other things that need to be escaped), even when escaped properly. The reason is that it escapes the quotation mark after the string which causes a malformed JSON object. <code>Example:"My name is \"Steve\""</code>
* '''Number''' are 1 or more digits that can have a leading sign (<code>+</code>/<code>-</code>). They're classified in Integers, that don't have a decimal mark, Doubles, that uses a dot (<code>.</code>) as a decimal mark, and Floats, that also have <code>f</code> appended after the number. Examples: <code>integer:-128</code>; <code>double:-1.2345</code>; & <code>float:1.2f</code>
* '''List''' (or 'Array') is multiple, comma separated values wrapped with square brackets. The containing values do not need to be of the same type. <code>Example:[1,2,3]</code>
* '''Boolean''' can either be <code>true</code> or <code>false</code>, but using Numbers works, too. When using numbers, 0 is false, everything else is true. <code>Example:true</code>
* '''Compound''' or 'Object' is a container for data structures (as explained above). They are wrapped with curly braces.
::'''''Notice''': The Data tag itself is a Compound. Example: <code>{Health:18,CustomName:"Friend"}</code>''
* '''null''' This is a placeholder an empty value. Do not put quotes. <code>Example:null</code>
When commands such as /testfor, /testforblock, and /clear are used to match NBT tags, they only check for the presence of the given tags in the target entity/block/item. This means that the entity/block/item may have additional tags and will still match. This is true even for lists/arrays: the order of a list is not acknowledged, and as long as every requested element is in the list, it will match even if there are additional elements.
For a complete listing of defined tags (though not all can be modified by commands), see:
* [[Chunk format#Block Format|Blocks]]
* [[Chunk format#Entity Format|Entities]]
** [[Chunk format#Mobs|Mobs]]
** [[Chunk format#Projectiles|Projectiles]] (arrows, fireballs, thrown potions, etc.)
** [[Chunk format#Items|Items]] (items on the ground)
** [[Chunk format#Vehicles|Vehicles]] (boats, minecarts, etc.)
** [[Chunk format#Dynamic Tiles|Dynamic Tiles]] (primed TNT, falling sand/gravel)
** [[Chunk format#Other|Other Entities]] (firework rockets, paintings, and item frames)
* [[Chunk format#Tile Entity Format|Tile Entities]] (chests, furnaces, command blocks, mob spawners, signs, etc.)
* [[Player.dat|Player]]
** [[Player.dat#Item structure|Items]] (items in player's inventory or containers)
For a complete list of identifiers, see:
* [[Data values#Block IDs|blocks]]
* [[Data values#Item IDs|items]]
* [[Data values#Entity IDs|entities]]
* [[Enchantment#Enchantments|enchantments]]
* [[Status effect|status/potion effects]]
* [[attribute]]s
== Raw JSON Text ==
The {{cmd|tellraw}} command uses a specific [https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient%28boolean%29 lenient] [[wikipedia:JSON|JSON]] format for raw chat messages. Similar to the NBT format notation above, concepts such as Strings, Objects (Compounds), and Lists are used to represent the various properties of raw chat.
For a direct tutorial to tellraw commands, see [http://www.minecraftforum.net/topic/1975697-174-tellraw-formatting-examples-updated-to-14w02c this thread]. For a tool to easily create tellraw commands, [http://ezekielelin.com/tellraw see this]. Note that both links are external to the Minecraft Wiki and may be outdated<!--Then again, the Wiki usually is too. But, at the time of this writing, the Wiki is a step ahead-->.
The format of "<''raw JSON message''>" is a JSON Object which supports the following (mostly optional) elements:
<div class="treeview">
* {{nbt|compound}} The base chat component Object
** {{nbt|string|text}}: A string representing raw text to display directly in chat. Note that selectors such as "@a" and "@p" are not translated into player names; use '''selector''' instead.
** {{nbt|list|extra}}: A list of additional objects, sharing the same format as the base object.
*** {{nbt|compound}} A list element with the same format as the base object (recursive). Note that all properties of this object are inherited by children except for '''text''', '''extra''', '''translate''', '''with''', and '''score'''. This means that children will retain the same formatting and events as this object unless they explicitly override them.
** {{nbt|string|color}}: The color to render this text in. Valid values are "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", "white", and "reset" (cancels out the effects of colors used by parent objects). Technically, "bold", "underline", "italic", "strikethrough", and "obfuscated" are also accepted, but it may be better practice to use the tags below for such formats.
** {{nbt|string|bold}}: Boolean (true/false) - whether to render text in bold. Defaults to false.
** {{nbt|string|underlined}}: Boolean (true/false) - whether to render text underlined. Defaults to false.
** {{nbt|string|italic}}: Boolean (true/false) - whether to render text in italics. Defaults to false.
** {{nbt|string|strikethrough}}: Boolean (true/false) - whether to render text with a strikethrough. Defaults to false.
** {{nbt|string|obfuscated}}: Boolean (true/false) - whether to render text obfuscated. Defaults to false.
** {{nbt|string|insertion}}: When the text is shift-clicked by a player, this string will be inserted in their chat input. It will not overwrite any existing text the player was writing.
** {{nbt|compound|clickEvent}}: Allows for events to occur when the player clicks on text.
*** {{nbt|string|action}}: The action to perform when clicked. Valid values are "open_url" (opens '''value''' as a URL in the player's default web browser), "run_command" (has '''value''' entered in chat as though the player typed it themselves. This can be used to run commands, but the command will fail if the player does not have the required permissions to use it), and "suggest_command" (similar to "run_command", but the text only appears in the player's chat input, and is not automatically entered. Unlike '''insertion''', this will replace the existing contents of the chat input).
*** {{nbt|string|value}}: The URL, chat, or command used by the specified '''action'''. Note that commands must be prefixed with the usual "/" slash.
** {{nbt|compound|hoverEvent}}: Allows for a tooltip to be displayed when the player hovers their mouse over text.
*** {{nbt|string|action}}: The type of tooltip to show. Valid values are "show_text" (shows raw JSON text), "show_item" (shows the tooltip of an item which can have NBT tags), "show_achievement" (shows formatted text describing an achievement or statistic. Normal achievement names are green, final achievement names are dark_purple, and statistic names are gray. In addition, a description is given for achievements), and "show_entity" (shows an entity's name, possibly its type, and its UUID).
*** {{nbt|string|value}}: The formatting of this tag varies depending on the action. Note that "show_text" is the only action to support an Object as the value; all other action values are Strings and should thus be wrapped in quotes.
**** ''"show_text"'': Can be either a raw String of text, or an Object with the same formatting as this base object. Note that '''clickEvent''' and '''hoverEvent''' do not function within the tooltip, but the formatting and '''extra''' tags still work.
**** ''"show_item"'': A ''string'' formatted like item NBT data. Contains the "id" tag, and optionally the "Damage" tag and "tag" tag (which is the same compound used as "dataTag" in the {{cmd|give}} command).
**** ''"show_achievement"'': The achievement or statistic's name. This uses the same format as achievement and statistic [[Scoreboard#Objectives|Scoreboard objective criteria]] and the {{cmd|achievement}} command.
**** ''"show_entity"'': A ''string'' formatted like a compound with the string values "type" (such as "Zombie"), "name", and "id" (should be an entity UUID, but can actually be any string).
** {{nbt|string|translate}}: The translation identifier of text to be displayed using the player's selected language. This identifier is the same as the identifiers found in lang files from assets or resource packs. The translated text will only be displayed if the '''text''' string is ''not'' used.
** {{nbt|list|with}}: A list of chat component arguments and/or string arguments to be used by '''translate'''.
*** The arguments are text corresponding to the arguments used by the translation string in the current language, in order (for example, the first list element corresponds to "%1$s" in a translation string).
** {{nbt|compound|score}}: A compound for displaying a player's score in an objective. Displays nothing if the player is not tracked in the given objective. Ignored completely if '''text''' or '''translate''' is present.
*** {{nbt|string|name}}: The name of the player whose score should be displayed. Selectors (such as @p) can be used, in addition to "fake" player names created by the scoreboard system. In addition, if the name is "*", it will show the player's own score (for example, <code>/tellraw @a {score:{name:"*",objective:"obj"}}</code> will show every online player their own score in the "obj" objective). Note that non-player entity scores (such as @e[type=Cow]) do not show, even if the entity has been given a score in the objective.
*** {{nbt|string|objective}}: The internal name of the objective to display the player's score in.
*** {{nbt|string|value}}: Optional. If present, this value is used regardless of what the score would have been.
** {{nbt|string|selector}}: A string containing a selector (@p,@a,@r, or @e) and, optionally, selector arguments. Unlike '''text''', the selector will be translated into the correct player/entity names. If more than one player/entity is detected by the selector, it will be displayed in a form such as 'Name1 and Name2' or 'Name1, Name2, Name3, and Name4'. Ignored completely if '''text''', '''translate''', or '''score''' is present.
</div>
Due to the '''extra''' tag, the above format may be recursively nested to produce very complex and functional text strings. However, a raw json string doesn't have to be complicated at all: virtually all properties are optional and may be left out.
To be valid, each object must have at least either '''text''', '''translate''', or '''score''' (everything else is optional). As a matter of shorthand, however, the entire Object may be substituted for a String. In this case, that string will be considered the value of the '''text''' property. For example, <code>"This is raw text"</code> is equivalent to <code>{text:"This is raw text"}</code>. This shorthand substitution is valid anywhere a raw text object is required (including the base <''raw json message''> argument of {{cmd|tellraw}}, the elements of the '''extra''' list, and the '''value''' of a "show_text" '''hover_event''').
Finally, unlike other commands using JSON, {{cmd|tellraw}} Strings support Unicode via the notation <code>\u####</code>, where #### is the Unicode hexadecimal number for the desired character.
== Historia ==
{{History|c}}
{{History||rowspawn=2|0.0.15a_03|Añadidos <code>/ban</code>, <code>/ban-ip</code>, <code>/banlist</code>, <code>/broadcast</code>, <code>/deop</code>, <code>/kick</code>, <code>/list</code>, <code>/op</code>, <code>/pardon</code>, <code>/pardon-ip</code>, <code>/save-all</code>, <code>/save-on</code>, <code>/save-off</code>, <code>/stop</code>, y <code>/whitelist</code>.}}
{{History||0.0.16a_01|Cambiado <code>/broadcast</code> a <code>/say</code>.}}
{{History||0.0.17a|Añadido <code>/setspawn</code>.}}
{{History||0.0.20|Añadido <code>/solid</code>.}}
{{History|r}}
{{History||1.3.1|rowspan=6|snap=12w16a|Añadido el modo de trucos y <code>/gamemode</code>, <code>/give</code>, <code>/kill</code>, <code>/time</code>, <code>/toggledownfall</code>, y <code>/xp</code>.}}
{{History|||snap=12w21a|Añadido <code>/seed</code>.}}
{{History|||snap=12w22a|Añadido <code>/defaultgamemode</code>.}}
{{History|||snap=12w24a|Añadido <code>/publish</code>.}}
{{History|||snap=12w25a|Ahora los trucos puedes ser activados o desactivados cuando se abre el mundo a otros jugadores a través del LAN.}}
{{History|||snap=12w27a|Añadido <code>/debug</code>.}}
{{History||1.4.2|rowspan=5|snap=12w32a|Añadidos <code>/difficulty</code>, <code>/gamerule</code>, <code>/spawnpoint</code>, y <code>/weather</code>.
|Añadidos [[#Selectores de objetivo|selectores de objetivo]].}}
{{History|||snap=12w37a|Añadido <code>/clear</code>.}}
{{History|||snap=12w38a|<code>/clear</code> ahora puede usarse para retirar bloques/objetos específicos.}}
{{History|||snap=12w41a|El limite para <code>/xp</code> ahora es 2.147.483.647 en vez de 5.000.}}
{{History||1.4.4|snap=1.4.4pre|Añadido <code>/enchant</code>.}}
{{History||1.5|rowspan=3|snap=13w03a|Añadido <code>/testfor</code>.}}
{{History|||snap=13w04a|Añadido<code>/scoreboard</code>.}}
{{History|||snap=13w09b|Añadido <code>/effect</code>.}}
{{History||1.6|rowspan=5|snap=13w23a|Añadido <code>/spreadplayers</code>.
|Añadido gamerule <code>naturalRegeneration</code>.}}
{{History|||snap=13w24a|Añadido gamerule <code>doDaylightCycle</code>.}}
{{History|||snap=1.6pre|Añadido <code>clear</code> argumento para <code>/effect</code>.}}
{{History|||snap=1.6.1pre|Añadido <code>/playsound</code>.}}
{{History||1.7.2|rowspan=5|snap=13w36a|Añadido <code>/summon</code>.
|Añadido el argumento <code>dataTag</code> para <code>/give</code>.}}
{{History|||snap=13w37a|Añadidos <code>/setblock</code>, <code>/tellraw</code>, y <code>/testforblock</code>.}}
{{History|||snap=13w38a|Añadido <code>/setidletimeout</code>.}}
{{History|||snap=13w43a|Añadido <code>/setworldspawn</code>.}}
{{History|u}}
{{History||1.8|rowspan=28|snap=14w02a|Añadido <code>/blockdata</code>.
|Añadido el selector <code>@e</code>.
|Añadido el argumento opcional jugador/entidad para <code>/kill</code>.
|Añadido un argumento adicional para <code>/clear</code> y <code>/testfor</code>.
|<code>/testfor</code> ya no es exclusivo de los bloques de comandos.
|Añadido <code>insertion</code> tag para <code>/tellraw</code>.}}
{{History|||snap=14w03a|Añadidos argumentos de rotación a <code>/tp</code>.
|Añadidos <code>dx</code>, <code>dy</code>, y <code>dz</code> al selector de argumentos.
|Añadidos <code>/clone</code> y <code>/fill</code>.
|Añadido gamerule <code>logAdminCommands</code>.}}
{{history|||snap=14w04a|Añadido <code>/particle</code>.}}
{{history|||snap=14w05a|Añadidos <code>spectator</code> a <code>/gamemode</code> y <code>/defaultgamemode</code>.}}
{{History|||snap=14w06a|Añadido el argumento <code>hideParticles</code> para <code>/effect</code>.
|Added <code>/trigger</code>.}}
{{History|||snap=14w07a|Añadidos <code>/execute</code> y <code>/testforblocks</code>.
|<code>/testfor</code> ahora puede comprobar búsquedas de NBT tags parciales.}}
{{History|||snap=14w08a|Los comandos que funcionan usando <code>/execute</code> ahora pasan su valor de exito de vuelta al bloque de comandos que los está ejecutando.}}
{{History|||snap=14w10a|Añadido gamerule <code>showDeathMessages</code>.
|Añadido la opción <code>force</code> a <code>/clone</code>.}}
{{History|||snap=14w17a|Añadido <code>/worldborder</code>.
|Añadido gamerule <code>randomTickSpeed</code>.}}
{{History|||snap=14w19a|Añadidos los argumentos <code>damage</code> y <code>warning</code> para <code>/worldborder</code>.}}
{{History|||snap=14w20a|Añadido <code>/title</code>.
|Añadido el argumento <code>selector</code> para <code>/tellraw</code>.
|Añadido la opción <code>move</code> para <code>/clone</code>.}}
{{History|||snap=14w26a|Añadido el argumento <code>add</code> para <code>/worldborder</code>.
|Añadido <code>/replaceitem</code>.
|Añadido gamerule <code>sendCommandFeedback</code>}}
{{History|foot}}
== Véase también ==
* [[Bloque de Comandos|Bloque de comandos]]
* [[Marcador]]
* [[Valores de Datos|Valores de datos]]
* [[Códigos de formato]]
[[Category:Server]]