Você pode seguir a nossa conta no Twitter onde são publicadas notícias sobre Minecraft e links rápidos para a Wiki 

Minecraft: Story Mode agora foi descontinuado. Se você já possui uma cópia, faça o download antes de 25 de junho, antes que os servidores fiquem off-line, caso contrário você poderá não conseguir no futuro. Consulte aqui para mais detalhes.

Traduções/comandos

De Minecraft Wiki
Ir para: navegação, pesquisa
Lang-pt.gif
A tradução da página está em andamento
Sinta-se livre para ajudar a Minecraft Wiki em Português!
cerca de 2% da tradução está concluída
ATENÇÃO
Essa página está sendo traduzida totalmente pelo projeto de atualização das paginas desatualizadas.
Information icon.svg
Esse recurso é exclusivo para Edição Java, Edição Bedrock e Education Edition.

Comandos, na Java, Bedrock e Education Edition, são recursos avançados ativados digitando certas sequências de texto.

Uso[editar | editar código-fonte]

No cliente, os comandos são inseridos através da janela do chat, que é exibido pressionando a tecla T (padrão) ou /. Usando a tecla / também irá inserir a barra que os comandos requerem como um prefixo, então é um atalho útil. As teclas e pode ser usado para visualizar texto inserido anteriormente, incluindo todos os comandos executados anteriormente. Pressionando a tecla Tab ↹ enquanto a entrada de comandos passa por possíveis comandos ou argumentos, e pode ser usada para inserir automaticamente as coordenadas do bloco analisadas antes de entrar no bate-papo.

Comandos também podem ser inseridos em um multijogador em servidor de console, mas não precedido por um / quando entrou dessa maneira. Um administrador do servidor executando comandos dessa maneira é geralmente chamado de "fantasma"".

Comandos no bloco de comandos pode ser precedido por uma barra, mas não é obrigatório. Comandos em um bloco de comando geralmente também requerem um argumento opcional, como o nome de usuário de um jogador.

A maioria dos comandos está disponível apenas nas seguintes situações:

  • No jogo multijogador, introduzido por um operador ou bloco de comando.
  • Em outros jogos multijogador, inseridos pelo jogador que abriu um jogo LAN com truques habilitados, ou está hospedando seu próprio servidor de multijogador
  • No um jogador, se cheats foram habilitados na criação do mundo (via o botão "Mais opções do mundo......").

Alguns comandos do jogador também estão disponíveis no modo um jogador, mesmo quando os truques não estão ativados.

Nota: Nos mundos um jogador, onde as trapaças não estavam habilitadas na criação, elas podem ser ativadas temporariamente, abrindo a sessão atual do jogo para jogar na LAN. ( Esc → "Abrir para LAN", em seguida o botão "Permitir comandos:" e "Iniciar mundo em LAN"). Você não precisa estar em uma LAN ou fazer com que outras pessoas participem. Isso não é permanente, mas permitirá o uso de comandos até que você saia do mundo, e as alterações feitas por meio de comandos (itens gerados, etc.) serão salvas com o mundo. Você pode fazer isso toda vez que começar a jogar o mundo novamente. Observe que isso desativará a pausa do jogo enquanto durar, portanto, enquanto estiver aberto para a LAN, você deverá ir a algum lugar seguro ou recarregar seu mundo antes de usar o Game Menu. Lembre-se de que você pode desativar seu mundo de LAN recarregando o mundo.

Notação de Tilde e Caret[editar | editar código-fonte]

Muitos comandos permitem que as coordenadas "relativas" sejam especificadas usando tildes (~). Um número a seguir a um til ou circunflexo é um offset de algo em vez de uma coordenada. O sinal do deslocamento especifica se deve ir na direção positiva ou negativa para esse eixo. Um único til por si só é uma abreviatura para ~0.

Por exemplo, /tp 0 64 0 vai teletransportar o usuário para a coordenada (0, 64, 0), while /tp ~3 ~ ~-3 will teleport the user to a position +3 blocks in the "x" direction (ou seja, east), mantenha a altura atual e -3 blocos na direção "z" (ou seja, north) e /tp ^ ^ ^3 vai teletransportar o usuário para uma posição +3 para frente.

Normalmente, as coordenadas absolutas podem ser misturadas com coordenadas relativas. Por exemplo, /tp ~ 64 ~ manterá as coordenadas "x" e "z" do usuário iguais, mas as teletransportará para a altura absoluta de 64, no entanto /tp ^-5 ^ ^ irá teleportar o jogador para a direita de acordo com a inclinação da sua cabeça. Carets são usados /tp ^left ^up ^forward.

A origem do deslocamento depende do comando. Por exemplo, no /tp o deslocamento é da posição inicial do alvo. Outros deslocamentos comuns incluem a partir da posição de execução do comando ou de outra coordenada especificada pelo comando.

Seletores de destino em Java[editar | editar código-fonte]

Esta seção precisa ser atualizada. Descrição: Não leva em conta diferenças entre o Java 1.13 e o Bedrock

Na maioria dos comandos em que um jogador pode ser especificado como um argumento, é possível "mirar" um ou mais jogadores satisfazendo certas condições em vez de especificar jogadores pelo nome. Para segmentar jogadores por condição, escolha uma variável de seleção de destino e, opcionalmente, um ou mais argumentos de seleção de destino para modificar as condições a serem atendidas.

Por exemplo, para alterar o modo de jogo de todos os jogadores na equipe Red para o modo criativo, em vez de especificá-los pelo nome individualmente:

/gamemode creative @a[team=Red]


Variáveis de seletor de destino[editar | editar código-fonte]

Resumo das variáveis do seletor de destino
Variável Função
@p jogador mais próximo
@r jogador aleatório
@a todos os jogadores
@e todas as entidades
@s a entidade executando o comando

Uma variável do seletor de destino identifica a ampla categoria de destinos a serem selecionados. Existem cinco variáveis:

@p
Tem como alvo o jogador mais próximo. Quando executado pelo console, a origem da seleção será em (0, 0, 0). Se houver vários jogadores mais próximos, causados por eles estar precisamente à mesma distância, o jogador que ingressou mais recentemente no servidor é selecionado.
Argumentos do seletor de destino pode ser usado para reduzir o conjunto de jogadores do qual o jogador mais próximo será selecionado. Por exemplo, @p[team=Red] terá como alvo o jogador mais próximo da equipe Red, mesmo que haja outros jogadores mais próximos.
O argumento do seletor de destino limit pode ser usado para aumentar o número de jogadores mais próximos alvo (por exemplo,, @p[limit=3] terá como alvo os três jogadores mais próximos).
@r
Alvos de um jogador aleatório.
Argumentos do seletor de destino pode ser usado para reduzir o conjunto de jogadores do qual um jogador aleatório será direcionado. Por exemplo, @r[team=Red] só irá direcionar um jogador aleatório da equipe Red.
O argumento do seletor de destino limit pode ser usado para aumentar o número de jogadores aleatórios alvos. Por exemplo, @r[limit=3] terá como alvo três jogadores aleatórios.
O argumento type não é permitido no @r. Para selecionar uma entidade aleatória, use @e[sort=random,limit=1].
@a
Alvos todos os jogadores, incluindo jogadores mortos. Nenhum outro seletor encontrará jogadores mortos, exceto @s.
Argumentos do seletor de destino pode ser usado para reduzir o conjunto de jogadores alvo. Por exemplo, @a[team=Red] só terá como alvo os jogadores da equipe Red.
@e
Alvos todas as entidades (incluindo jogadores).
Argumentos do seletor de destino pode ser usado para reduzir o conjunto de entidades segmentadas. Por exemplo, @e[type=cow] segmentará apenas vacas.
@s
Segmenta apenas uma entidade - a entidade que executou o comando, incluindo jogadores mortos. Se o executor não for uma entidade, por exemplo, se o executor for um bloco de comandos ou um console do servidor, esse seletor não encontrará nada.
Argumentos do seletor de destino pode ser usado para especificar se o executor está realmente qualificado para ser segmentado. Por exemplo, @s[type=cow,team=Red] só irá direcionar o executor do comando se o executor for uma vaca na equipe Red.


Argumentos do seletor de destino[editar | editar código-fonte]

Resumo dos argumentos do seletor de destino
Seleção por posição
Argumento(s) Critério de seleção
x, y, z coordenada
distance distância
dx, dy, dz dimensões de volume
Seleção por valores no placar
Argumento(s) Critério de seleção
scores pontuações
tag scoreboard tag
team team name
Selection by Traits
Argument(s) Selection criteria
limit limit
level experience level
gamemode game mode
name entity name
x_rotation vertical rotation
y_rotation horizontal rotation
type entity type

After using a target selector, you can optionally use arguments to modify the set of targets selected. When used with @a or @e, arguments narrow down the number of targets from the full list to a specific few. When used with @p or @r, arguments narrow the number of targets down from the full list to a smaller set from which the nearest or random player is selected. When used with @s, the command user will only be targeted if all arguments pass, otherwise the command will fail.

Add argument-value pairs as a comma-separated list contained within square brackets after the target selector variable:

@<variable>[<argument>=<value>,<argument>=<value>,…].

Arguments and values are case-sensitive. Spaces are allowed around the brackets, equal signs, and commas, except in between the target variable and the first bracket. Commas must be used to separate argument-value pairs.

Selecting targets by coordinate
[x=X,y=Y,z=Z] — Selects targets based on distance to that exact position. Combine with selecting by distance to select only targets within a certain distance of that specific position, or combine with volume dimensions to select only targets within a certain cubic volume.
The coordinates are doubles an allow values like 12.34, and are not center-corrected, meaning x=0 is no longer corrected to x=0.5 - tilde notation is available for selector argument coordinates[Edição Bedrock apenas] .
Selecting targets by distance
[distance=DISTANCE] — Selects only targets exactly DISTANCE blocks from the command's execution. If DISTANCE is a range, selects only targets whose distance falls within that range. Only non-negative values are allowed.
If a coordinate (above) and either or both radius/i are both defined, the radius/i will center on the coordinate rather than the postion of the command's execution.
Ranges are supported to allow for only certain distances.
  • distance=10 targets only entities exactly 10 blocks away
  • distance=10..12 targets only entities more than 10 blocks but less than 12 blocks away (inclusive)
  • distance=5.. targets only entities more than 5 blocks away (inclusive)
  • distance=..15 targets only entities less than 15 blocks away (inclusive)
Selecting targets by volume
[dx=DX,dy=DY,dz=DZ]
Selects only targets within the volume defined as starting from the location where the command was executed and extending DX blocks in the "x" direction (i.e., east/west), DY blocks in the "y" direction (i.e., upwards/downwards), and DZ blocks in the "z" direction (i.e., north/south). If an initial coordinate is specified with the x, y, and z arguments, that will be used instead of the position of the command's execution for the lower northwestern corner (dx, dy, and dz still specify distances from that coordinate; they do not specify a separate coordinate). All values are allowed, including negative and partial values.
It is possible to combine selection by distance and selection by volume, in which case the command will only select targets within the overlap of both regions (within certain radius/i of the volume's lower northwest corner and not outside the defined volume).
Selecting targets by scores
[scores={OBJECTIVE1=SCORE1,OBJECTIVE2=SCORE2,...}] — Selects only targets with a score in objective OBJECTIVE1 of SCORE1, and a score in objective OBJECTIVE2 of SCORE2.
All tested objectives are in a single tag, with a list of individual score selectors between braces afterwards. The selectors inside the braces support ranges.
  • scores={myscore=10} — Selects only targets with a score in objective myscore of exactly 10.
  • scores={myscore=10..12} — Selects only targets with a score in objective myscore of between 10 and 12.
  • scores={myscore=5..} — Selects only targets with a score in objective myscore of 5 or greater.
  • scores={myscore=..15} — Selects only targets with a score in objective myscore of 15 or less.
  • scores={foo=10,bar=1..5} — Selects only targets with a score in objective foo of exactly 10, and a score in objective bar of between 1 and 5.
Veja também: Scoreboard#Objectives
Selecting targets by tag
[tag=TAG] — Selects only targets that have the scoreboard tag TAG.
[tag=!TAG] — Selects only targets that do not have the scoreboard tag TAG.
[tag=TAG1,tag=TAG2] — Selects only targets that have both the scoreboard tag TAG1 and TAG2.
[tag=!TAG1,tag=!TAG2] — Selects only targets that have neither the scoreboard tag TAG1 nor the scoreboard tag TAG2.
[tag=TAG1,tag=!TAG2] — Selects only targets that have the scoreboard tag TAG1 but not the scoreboard tag TAG2.
[tag=] — Selects only targets without any scoreboard tags.
[tag=!] — Selects only targets with any scoreboard tags.
Veja também: Scoreboard#Tags_commands
Selecting targets by team
[team=TEAM] — Selects only targets on team TEAM.
[team=!TEAM] — Selects only targets not on team TEAM.
[team=] — Selects only targets not on any team.
[team=!] — Selects only targets on any team.
Veja também: Scoreboard#Teams
Selecting targets with a limit
[limit=LIMIT] — Selects only the specified number of targets at maximum.
When used with @p or @r, this argument defaults to 1, so using a higher limit will increase the number of nearest or random targets returned. When used with @a or @e, this argument returns only a limited number of targets.
Using an additional argument sort, one can specify how the targets are chosen and limited.
  • sort=nearest — sorting by distance, nearest first (default for @p)
  • sort=furthest — sorting by distance, farthest first
  • sort=random — sorting randomly (default for @r)
  • sort=arbitrary — no sorting (default for @e@a)
Selecting targets by experience level
[level=L] — Selects only targets with L experience levels.
This automatically filters out all non-player targets.
This selector supports ranges.
  • level=10 — level 10
  • level=10..12 — 10, 11, or 12
  • level=5.. — level 5 or above
  • level=..15 — level 15 or below
Selecting targets by game mode
[gamemode=GAMEMODE] — Selects only targets in the specified game mode.
[gamemode=!GAMEMODE] — Selects only targets that are not on the specified game mode.
Permitted values for GAMEMODE are:
  • survival: survival mode
  • creative: creative mode
  • adventure: adventure mode
  • spectator: spectator mode[Edição Java apenas]
This automatically filters out all non-player targets.
Selecting targets by name
[name=NAME] — Selects only targets named NAME.
[name=!NAME] — Selects only targets not named NAME.
If quotes are used around NAME, then spaces are allowed. NAME can only be a simple string, not a JSON text compound.
Selecting targets by vertical rotation
[x_rotation=X_ROTATION] — Selects only targets with vertical rotation of X_ROTATION.
Vertical rotation values vary from -90 facing straight up, increasing to 0 at horizontal, increasing to 90 facing straight down (thus vertical rotation values increase with rotation downwards).
This selector supports ranges.
  • x_rotation=10 — vertical rotation of exactly 10
  • x_rotation=10..12 — vertical rotation from 10 to 12 (inclusive)
  • x_rotation=5.. — vertical rotation of 5 or above
  • x_rotation=..15 — vertical rotation of 15 or below
Selecting targets by horizontal rotation
[y_rotation=Y_ROTATION] — Selects only targets with a horizontal rotation of Y_ROTATION.
Horizontal rotation values vary from -180/180 (facing due north), to -90 (facing due east), to 0 (facing due south), to 90 (facing due west), to -180/180 again. This argument supports ranges.
  • y_rotation=10 isy_rotation of exactly 10
  • y_rotation=10..12 is y_rotation 10 to 12
  • y_rotation=5.. is anything y_rotation5 or above
  • y_rotation=..15 is anything y_rotation 15 or below
Selecting targets by type
[type=TYPE] — Selects only targets of the specific entity type.
[type=!TYPE] — Selects only targets not of the specific entity type.
TYPE must be an entity ID used to identify different types of entities internally (for example, creeper for creepers, minecart for regular minecarts, tnt for primed TNT, etc.). Entity IDs are case-sensitive and invalid entity IDs will cause the command to fail. One may use type=player or type=!player to selected entities which are or are not players, respectively.
When used with @r, can change its normal behavior of targeting only players to target other entities.


Data tags[editar | editar código-fonte]

A data tag is a sequence of text which describes a data structure using attribute-value pairs. Data tags are used in Java Edition commands to specify complex data for players, entities, and some blocks.

A data tag consists of zero or more attribute-value pairs separated by commas and delineated by curly brackets. Each attribute-value pair consists of an attribute name and the attribute's value, separated by a colon. Some values, however, may themselves contain attribute-value pairs, allowing a data tag to describe a hierarchical data structure.

Example: {name1:123,name2:"sometext",name3:{subname1:456,subname2:789}}

The data structures that data tags describe are the same ones used in Minecraft's save files. These data structures are described in other articles and commands expect data tags to use the same attribute names (which are case-sensitive):

Data Structure Specification Links
Objects Examples
Block entities chests, furnaces, command blocks, mob spawners, signs, etc.
Items items in inventories (includes specifications for enchantments, lore, custom names, etc.)
Item entities items on the ground
Mobs creepers, cows, villagers, etc.
Projectiles arrows, fireballs, thrown potions, etc.
Vehicles boats, minecarts, etc.
Dynamic tiles primed TNT, falling sand/gravel/anvils
Other entities firework rockets, paintings, and item frames

The defined data structures also expect the values to be of the correct type.

Data Tags Value Types
Type Description
 Byte An integer between -128 and 127 (inclusive).
 Short An integer between -32,768 and 32,767 (inclusive).
 Int An integer between -2,147,483,648 and 2,147,483,647 (inclusive).
 Long An integer between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807 (inclusive).
 Float
 Double
Float - 32-bit single-precision floating point, Example: 3.1415926

Double - 64-bit double-precision floating point, Example: 3.141592653589793

See IEEE floating point for details.

 String A sequence of text, optionally delineated with double quotes.

Double quotes must be used if the String contains commas, curly brackets, or square brackets. To include a double quote inside a String, add a backslash before the double quote.

Example: "Call me \"Ishmael\""
 List A sequence of values, separated by commas and delineated with square brackets. The values must be of the same type, which is dictated by the first value in the sequence.
Example: [3.2,64.5,129.5]
 Byte Array A sequence of integers between -128 and 127 (inclusive), separated by commas, delineated with square brackets, and prefixed with B;.
Example: [B;1b,2b,3b]
 Int Array A sequence of integers between -2,147,483,648 and 2,147,483,647 (inclusive), separated by commas, delineated with square brackets, and prefixed with I;.
Example: [I;1,2,3]
 Long Array A sequence of integers between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807 (inclusive), separated by commas, delineated with square brackets, and prefixed with L;.
Example: [L;1l,2l,3l]
 Compound A sequence of attribute-value pairs, separated by commas and delineated with curly brackets.
Example: {X:3,Y:64,Z:129}

Every data tag argument is itself a Compound.

 Boolean A value, expressed as "true" or "false". This is only seen in JSON formatting, as a  Byte tag is usually used in NBT data to determine a boolean value as 0 (for false) and 1 (for true).
Example: {doFoo:true}

Some commands may require that a number's type be specified by adding a letter (B, S, L, F, D) to the end of the value. For example, 3s for a short, 3.2f for a float, etc. (This doesn't work with I for int.) The letter can be uppercase or lowercase. When no letter is used and Minecraft can't tell the type from context, it assumes double (if there's a decimal point), int (if there's no decimal point and the number is small enough to store as an int), or string (if neither is true). A square-bracketed literal is assumed to be a list unless an identifier is used: [I;1,2,3] for an int array and [L;1L,2L,3L] for a long array.

When commands such as /testfor, /testforblock, and /clear are used to match data tags, they only check for the presence of the provided 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 and 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.

The format used for data tags is a lenient form of JSON.

Raw JSON text[editar | editar código-fonte]

The /tellraw and /title commands use strict JSON syntax.

Scores and target selectors are evaluated for a Sign when it is placed or edited and for a Written Book when it is "resolved" (opened for the first time after signing). They won't update after that, and they won't work if edited onto an existing sign with an NBT editor, or onto a book that's already marked resolved. There's no way to wrap text onto the next line of a sign or the next page of a book during resolution; instead, the extra text will simply disappear.

The format of raw JSON text is a JSON Object which supports the following (mostly optional) elements:

  • The base chat component Object
    •  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. "\n" is newline (enter).
    •  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.
    •  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).
    •  score: 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.
      •  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 reader's own score (for example, /tellraw @a {"score":{"name":"*","objective":"obj"}} will show every online player their own score in the "obj" objective).
      •  objective: The internal name of the objective to display the player's score in.
      •  value: Optional. If present, this value is used regardless of what the score would have been.
    •  selector: A string containing a selector (@p,@a,@r,@e or @s) 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. Clicking a player's name inserted into a /tellraw command this way will suggest a command to whisper to that player. Shift-clicking a player's name will insert that name into chat. Shift-clicking a non-player entity's name will insert its UUID into chat.
    •  keybind: A string that can be used to display the key needed to preform a certain action. An example is key.inventory which will always display "E" unless the player has set a different key for opening their inventory.
    •  extra: A list of additional objects, sharing the same format as the base object.
      • 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.
    •  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", "italic", "underlined", "strikethrough", and "obfuscated" are also accepted, but it may be better practice to use the tags below for such formats.
    •  bold: Boolean (true/false) - whether to render text in bold. Defaults to false.
    •  italic: Boolean (true/false) - whether to render text in italics. Defaults to false.
    •  underlined: Boolean (true/false) - whether to render text underlined. Defaults to false.
    •  strikethrough: Boolean (true/false) - whether to render text with a strikethrough. Defaults to false.
    •  obfuscated: Boolean (true/false) - whether to render text obfuscated. Defaults to false.
    •  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.
    •  clickEvent: Allows for events to occur when the player clicks on text.
      •  action: The action to perform when clicked. Valid values are "open_url" (opens value as a URL in the player's default web browser), "open_file" (opens the value file on the user's computer), "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), "change_page" (can only be used in written books) changes to page value if that page exists, and "suggest_command" (similar to "run_command" but it cannot be used in a written book, the text only appears in the player's chat input and it is not automatically entered. Unlike insertion, this will replace the existing contents of the chat input). "open_file" is used in messages automatically generated by the game (e.g. on taking a screenshot) and cannot be used in commands or signs.
      •  value: The URL, file, chat, command or book page used by the specified action. Note that commands must be prefixed with the usual "/" slash.
    •  hoverEvent: Allows for a tooltip to be displayed when the player hovers their mouse over text.
      •  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), and "show_entity" (shows an entity's name, possibly its type, and its UUID).
      •  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 /give 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).

Due to the extra tag, the above format may be recursively nested to produce very complex and functional text strings. However, a raw json text 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, score, selector or keybind (everything else is optional). As a matter of shorthand, however, the entire Object may be substituted with a String. In this case, that string will be considered the value of the text property. For example, "This is raw text" is equivalent to {"text":"This is raw text"}. This shorthand substitution is valid anywhere a raw text object is required (including the base <raw json message> argument of /tellraw, the elements of the extra list, and the value of a "show_text" hover_event).

/tellraw also accepts an array of objects and/or strings; they are concatenated. It even accepts a tree of nested arrays; they are traversed depth-first. For example:

/tellraw @a ["Hello there, ",{"selector":"@p"},"."]
/tellraw @a [[[["The "],[["quick ","brown "],[{"selector":"@p"}," jumps "],"over "],"the "],["lazy ","dog."]]]

Finally, unlike other commands using JSON, /tellraw Strings support Unicode via the notation \u####, where #### is the Unicode hexadecimal number for the desired character.

External links
Skylinerw's JSON Text Component
Tellraw Generator
List of all Keybinds

Block/item names[editar | editar código-fonte]

Many commands have arguments that identify particular types of blocks or items. In the command syntax below, these typically appear as elements named <block>, <item>, or the like which are replaced with identifiers such as minecraft:stone in the examples. In Java Edition, these identifiers are namespaced and all have the "minecraft:" prefix; in Bedrock Edition this prefix must be omitted.

Summary of commands[editar | editar código-fonte]

The table below summarizes available commands. Click a column heading to sort by that column.

Summary of Commands
Command Description BE EE JE OP level MP Only
/ability Grants or revokes a player ability. Sim Sim 2
/advancement Gives, removes, or checks player advancements. Sim 2
/ban Adds player to banlist. Sim 3 MP
/ban-ip Adds IP address to banlist. Sim 3 MP
/banlist Displays banlist. Sim 3 MP
/bossbar Creates and modifies bossbars. Sim 2
/clear Clears items from player inventory. Yes Sim Sim 2
/clone Copies blocks from one place to another. Sim Sim Sim 2
/data Gets, merges, and removes block entity and entity NBT data. Sim 2
/datapack Controls loaded data packs. Sim 2
/debug Starts or stops a debugging session. Sim 3
/defaultgamemode Sets the default game mode. Sim 2
/deop Revokes operator status from a player. Sim Sim Sim 3 MP
/difficulty Sets the difficulty level. Sim Sim Sim 2
/drop Drops items from an inventory slot onto the ground. Upcoming 2 Sim
/effect Add or remove status effects. Sim Sim Sim 2
/enchant Enchants a player item. Sim Sim Sim 2
/execute Executes another command. Sim Sim Sim 2
/experience Adds or removes player experience. Sim Sim Sim 2
/fill Fills a region with a specific block. Sim Sim Sim 2
/forceload Forces chunks to constantly be loaded or not. Sim 2
/function Runs a function. Upcoming Sim 2
/gamemode Sets a player's game mode. Sim Sim Sim 2
/gamerule Sets or queries a game rule value. Sim Sim Sim 2
/give Gives an item to a player. Sim Sim Sim 2
/help Provides help for commands. Sim Sim Sim 0
/kick Kicks a player off a server. Sim 3 MP
/kill Kills entities (players, mobs, items, etc.). Sim Sim Sim 2
/list Lists players on the server. Sim Sim Sim 0 MP
/locate Locates closest structure. Sim Sim Sim 2
/me Displays a message about yourself. Sim Sim Sim 0
/mixer Mixer interactivity control. Sim 2
/msg Displays a private message to other players. Sim Sim Sim 0
/op Grants operator status to a player. Sim Sim Sim 3 MP
/pardon Removes entries from the banlist. Sim 3 MP
/particle Creates particles. Upcoming Sim 2
/playsound Plays a sound. Sim Sim Sim 2
/publish Opens single-player world to local network. Sim 4 SP only
/recipe Gives or takes player recipes. Sim 2
/reload Reloads loot tables, advancements, and functions from disk. Upcoming Sim 4
/replaceitem Replaces items in inventories. Sim Sim Sim 2
/save-all Saves the server to disk. Sim 4 MP
/save-off Disables automatic server saves. Sim 4 MP
/save-on Enables automatic server saves. Sim 4 MP
/say Displays a message to multiple players. Sim Sim Sim 1
/schedule Delays the execution of a function. Upcoming 2
/scoreboard Manages objectives, players, teams, and tags. Sim Sim 2
/seed Displays the world seed. Sim 2
/setblock Changes a block to another block. Sim Sim Sim 2
/setidletimeout Sets the time before idle players are kicked. Sim 3 MP
/setmaxplayers Sets the maximum number of players allowed to join. Sim Sim 0
/setworldspawn Sets the world spawn. Sim Sim Sim 2
/spawnpoint Sets the spawn point for a player. Sim Sim Sim 2
/spreadplayers Teleports entities to random locations. Sim Sim Sim 2
/stop Stops a server. Sim 4 MP
/stopsound Stops a sound. Sim Sim Sim 2
/summon Summons an entity. Sim Sim Sim 2
/tag Controls entity tags. Sim 2
/team Controls teams. Sim 2
/teleport Teleports entities. Sim Sim Sim 2
/tell Displays a private message to other players. Sim Sim Sim 0
/tellraw Displays a JSON message to players. Sim 2
/testfor Counts entities matching specified conditions. Sim Sim 2
/testforblock Tests whether a block is in a location. Sim Sim 2
/testforblocks Tests whether the blocks in two regions match. Sim Sim 2
/tickingarea Add, remove, or list ticking areas. Sim Sim 0
/time Changes or queries the world's game time. Sim Sim Sim 2
/title Manages screen titles. Sim Sim Sim 2
/toggledownfall Toggles the weather. Sim Sim 2
/tp Teleports entities. Sim Sim Sim 2
/transferserver Transfer player to a server. Sim Sim 0
/trigger Sets a trigger to be activated. Sim 0
/w Displays a private message to other players. Sim Sim Sim 0
/weather Sets the weather. Sim Sim Sim 2
/whitelist Manages server whitelist. Sim 3 MP
/worldborder Manages the world border. Sim 2
/wsserver Connects to a WebSocket server. Sim Sim 0
/xp Adds or removes player experience. Sim Sim Sim 2

Command Guide[editar | editar código-fonte]

Syntax
If you see… Then
plain text Enter this literally, exactly as shown.
italics Replace this with an appropriate value.
<angle brackets> This is a required argument.
[square brackets] This is an optional argument.
x|y

Pick one of the options shown.

Available options are shown separated by vertical bars: |

ellipsis … The argument may consist of multiple words separated by spaces.
x: int The argument consists of numbers.
y: string The argument consists of multiple words which could be separated by spaces.
Success Conditions
A command's Success Conditions must be met in order for the game to consider the command "successful". This is used to determine a variety of things, such as the output of a redstone comparator feeding from command block with a command. Note that not all "successful" commands actually do something, and not all "failed" commands fail to do something useful.
Restrictions
Describes restrictions on who can use the command or in what context.
  • None: The command can be used by any player in any world. The following commands have no restrictions: /help, /me, /tell, and /trigger.
  • Operator: The command may only be used by an operator or in singleplayer mode with cheats enabled. On multiplayer servers, the results of these commands are broadcast to other ops online.
No multiplayer commands permit target selectors in arguments.
Except for /list, multiplayer commands cannot be used in command blocks.
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.

List of commands[editar | editar código-fonte]

advancement

[Edição Java apenas]
[editar]

ban

[Edição Java apenas]
[editar]

bossbar

[Edição Java apenas]
[editar]

clear

[editar]

clone

[editar]

data

[Edição Java apenas]
[editar]

datapack

[Edição Java apenas]
[editar]

daylock

[Edição Bedrock apenas]
[editar]

debug

[Edição Java apenas]
[editar]

defaultgamemode

[Edição Java apenas]
[editar]

deop

[editar]

difficulty

[editar]

effect

[editar]

enchant

[editar]

experience

[Edição Java apenas]
[editar]

execute

[editar]

fill

[editar]

forceload

[Edição Java apenas]
[editar]

function

[Edição Java apenas]
[editar]

gamemode

[editar]

gamerule

[editar]

give

[editar]

help

[editar]

kick

[Edição Java apenas]
[editar]

kill

[editar]

list

[editar]

locate

[editar]

me

[editar]

mixer

[Edição Bedrock apenas]
[editar]

op

[editar]

pardon

[Edição Java apenas]
[editar]

particle

[Edição Java apenas]
[editar]

playsound

[editar]

publish

[Edição Java apenas]
[editar]

recipe

[Edição Java apenas]
[editar]

reload

[Edição Java apenas]
[editar]

replaceitem

[editar]

save

[Edição Java apenas]
[editar]

say

[editar]

scoreboard

[Edição Java e Bedrock apenas]
[editar]

seed

[Edição Java apenas]
[editar]

setblock

[editar]

setidletimeout

[Edição Java apenas]
[editar]

setmaxplayers

[Edição Bedrock apenas]
[editar]

setworldspawn

[editar]

spawnpoint

[editar]

spreadplayers

[editar]

stop

[Edição Java apenas]
[editar]

stopsound

[editar]

summon

[editar]

tag

[Edição Java apenas]
[editar]

team

[Edição Java apenas]
[editar]

teleport

[editar]

tell

[editar]

tellraw

[Edição Java apenas]
[editar]

testfor

[Edição Bedrock apenas]
[editar]

testforblock

[Edição Bedrock apenas]
[editar]

testforblocks

[Edição Bedrock apenas]
[editar]

tickingarea

[Edição Bedrock apenas]
[editar]

time

[editar]

title

[editar]

toggledownfall

[Edição Bedrock apenas]
[editar]

tp

[editar]

transferserver

[Edição Bedrock apenas]
[editar]

trigger

[Edição Java apenas]
[editar]

weather

[editar]

whitelist

[editar]

worldborder

[Edição Java apenas]
[editar]

wsserver

[Edição Bedrock apenas]
[editar]


Removed commands[editar | editar código-fonte]

Grass Block Revision 2.png
Essa seção descreve conteúdo que não está mais no jogo.
Esses recursos existem apenas em versões desatualizadas de Minecraft.
Pesquisas adicionais são necessárias.
This seção requer pesquisa adicional (August 27, 2015).

achievement

[editar]

banip

[editar]

blockdata

[editar]

broadcast

[editar]

entitydata

[editar]

home

[editar]

setspawn

[editar]

solid

[editar]

stats

[editar]

unban

[editar]

Upcoming commands[editar | editar código-fonte]

Grass Block.svg
Esta página contém conteúdo sobre os recursos que podem ser incluídos na próxima atualização.
Esses recursos têm aparecido nas versões de desenvolvimento, mas a atualização completa contendo esses recursos ainda não foi liberada.

schedule

[Edição Java apenas]
[editar]

drop

[Edição Java apenas]
[editar]

Video[editar | editar código-fonte]

Video made by slicedlime: Commands/Advanced Video

History[editar | editar código-fonte]

Edição Java Classic
0.0.15a (Multiplayer Test 3)Added /ban, /banip, /broadcast, /deop, /kick, /op, /tp, and /unban.
0.0.16a_01Changed /broadcast to /say.
0.0.17aAdded /setspawn.
0.0.20aAdded /solid.
Edição Java Indev
0.31All commands removed.
Edição Java Alpha
v1.0.16Added /ban, /ban-ip, /banlist, /deop, /home, /kick, /op, /pardon, /pardon-ip, /say, and /stop.
v1.0.16_01Added /save-all, /save-on, /save-off and /tp.
v1.0.16_02Added /list and /tell.
v1.2.5Removed /home.
v1.2.6Added /kill.
Edição Java Beta
1.3Added /whitelist.
Edição Java
1.3.112w16aAdded cheats mode and /gamemode, /give, /time, /toggledownfall, and /xp.
12w17aAdded /help.
12w21aAdded /seed.
12w22aAdded /defaultgamemode.
12w24aAdded /publish.
12w25aCheats can now be turned on or off when opening a world to other players through LAN.
12w27aAdded /debug.
12w30a/gamemode 3 change to /gamemode 0.
1.4.212w32aAdded /difficulty, /gamerule, /spawnpoint, and /weather.
Added target selectors.
12w37aAdded /clear.
12w38aAdded item arguments to /clear.
12w41aThe limit for /xp is now 2,147,483,647 instead of 5,000.
1.4.4preAdded /enchant.
1.513w03aAdded /testfor.
13w04aAdded /scoreboard.
13w09bAdded /effect.
1.6.113w23aAdded /spreadplayers.
Added gamerule naturalRegeneration.
13w24aAdded gamerule doDaylightCycle.
13w24bThe damage dealt by /kill was changed from 1,000 to 3.4×1038.
1.6-preAdded clear argument to /effect.
preAdded /playsound.
1.7.213w36aAdded /summon.
Added /achievement.
Added dataTag argument to /give.
13w37aAdded /setblock, /tellraw, and /testforblock.
13w38aAdded /setidletimeout.
13w43aAdded /setworldspawn.
1.814w02aAdded /blockdata.
Added the @e target selector variable.
Added player|entity argument to /kill.
Added data argument to /clear.
Added dataTag argument to /testfor.
/testfor is no longer exclusive to command blocks.
Added insertion attribute to raw JSON text specification.
14w02cTo fix MC-44371, /kill now directly kills non-living targets, rather than dealing 3.4×1038 void damage.
14w03aAdded rotation arguments to /tp.
Added dx, dy, and dz to target selector arguments.
Added /clone and /fill.
Added gamerule logAdminCommands.
NBT data now supports using string IDs rather than numerical IDs.
Numerical IDs no longer work in other parts of commands, though they still work for NBT data.
14w04aAdded /particle.
14w05aAdded spectator to /gamemode and /defaultgamemode.
14w06aAdded hideParticles argument to /effect.
Added /trigger.
14w07aAdded /execute and /testforblocks.
/testfor can now test for partial NBT tag matches.
14w08aCommands run using /execute now pass their success value back to the command block running them.
14w10aAdded gamerule showDeathMessages.
Added force option to /clone.
14w17aAdded /worldborder.
Added gamerule randomTickSpeed.
14w19aAdded /worldborder damage and /worldborder warning.
14w20aAdded /title.
Added selector attribute to raw JSON text specification.
Added move option to /clone.
14w26aAdded /worldborder add.
Added /replaceitem.
Added gamerule sendCommandFeedback
14w28aAdded /stats.
14w29aAdded /worldborder get.
Added force argument to /particle.
Added /time query.
Added the ability to create dummy gamerules.
Added QueryResults to /stats.
14w30a/summon can now spawn lightning.
14w31a/debug can be run in single player.
Added chunk argument to /debug.
14w32bAdded /entitydata.
/give can no longer make illegal stacks.
1.8.1pre1Added the game rule doEntityDrops.
The game rule doTileDrops no longer affects entities.
1.915w37aAdded gamerule spectatorsGenerateChunks.
15w43a/gamemode now displays in chat the gamemode the player switched to.
15w49a/playsound now accepts Tab to complete.
Added player and params tag to the /particle
15w49b/time query <value> now accepts day as a value.
15w51aAdded gamerule spawnRadius.
16w02aThe m selector now accepts the standard literal gamemode values and abbreviations, such as a and adventure, and these may be negated as well.
/playsound now requires a source parameter, specifying what is the sound's category for volume purposes.
Running /help in a command block will now randomly use one of various different humorous phrases as the previous output.
16w03a/achievement no longer affects statistics.
16w07aAdded gamerule disableElytraMovementCheck.
1.9.3pre1/tp will no longer teleport the player to a y-coordinate outside the range -512 to 512.
pre2Added /stopsound.
1.1016w21bThe y-coordinate range of /tp is increased to -4096 to 4096.
pre1Added /teleport, which is like /tp, except that the target parameter is mandatory, the 'teleport to other player' usage is unavailable, and the use of relative coordinates is relative to the executor of the command, rather than relative to the target.
1.1116w32aAdded block state support to /execute, /fill, /setblock and /testforblock.
16w32bAdded ability for /title to display text in the action bar position.
16w38aAdded gamerules doWeatherCycle and maxEntityCramming.
Removed implicit target selectors (for example, @e[167,28,454]).
Invalid target selectors (such as @e[Type=creeper], @e[asdf=nonexistent], and @e[malformed]) now generate an error instead of being silently ignored.
16w39aAdded /locate.
1.1217w13aAdded /recipe and /advancement.
Added gamerule doLimitedCrafting.
Removed /achievement.
17w16bAdded gamerule maxCommandChainLength.
Added the @s target selector variable
17w18aAdded gamerule announceAdvancements.
Added /reload.
pre1Added gamerule gameLoopFunction.
Added /function.
1.1317w45aA new library named Brigadier is now used to parse commands. Different components of commands are displayed in different colors, and errors will be displayed in red without having to run the command. Commands, for the most part, do not allow uppercase letters, and are now much faster and more efficient.
An nbt argument in target selectors.
Changed the syntax for several commands.[mais informação necessitada]
Added /tag and /team.
Removed /enchant, /stats, /testfor, /testforblock, /testforblocks and /toggledownfall.
The syntax of /execute has been split off.
/gamerule no longer accepts unknown values ("custom gamerules").
Values to /gamerule are now type checked.
/publish now accepts an optional port argument.
17w45bAdded /data.
Removed /entitydata.
Reworked /execute store <x> <y> <z> [<command>|detect].
17w46aAdded /datapack.
The player now has the option to toggle automatic command suggestions.
The command UI has a new prototype, and now works in multiplayer.
17w47aRemoved /blockdata.
Particle names have been changed for the command /particle.
Added an option in chat to toggle automatic command suggestions.
17w48aTweaked the command suggestion UI.
Reworked tab-completion for coordinates.
17w49bRemoved the gameLoopFunction /gamerule.
17w50aLocal coordinates can now be specified in commands using ^.
Tab-completing when not targeting a block will suggest ~ ~ ~.
18w01aAdded facing to /teleport, which will make the target entity face an entity or a location.
Added the options noon and midnight to /time set <value>.
Changed all custom names (blocks, items, entities, block entities) to translatable text components.
Thrower and Owner nbt keys of item entities are no longer strings but are instead compounds with two longs named L and M.
owner nbt keys of snowballs, eggs and ender pearls are no longer strings but are instead compounds with two longs named L and M.
18w02aErrors during a command are now a nicer error message (with a tool tip for more info).
/teleport has been simplified a bit, and players can now teleport to entities in other dimensions.
Added new sub-commands to /execute to allow for more control over commands.
Server commands now run from world spawn in the Overworld, instead of at 0,0,0.
18w03aImproved performance of command parsing and command execution.
Added commands to the profiler (/debug).
/data get with a path now works on non-numeric values.
Added the /particle <name> <pos> <y> <z> <xd> <yd> <zd> <speed> shortcut.
18w05aAdded /bossbar
New /execute store <x> <y> <z> [<command>|detect] subcommand.
Added basic entity selector suggestions in the command UI.
A warning is now logged for ambiguous commands.
18w06aRe-added /enchant.
Added command suggestions for entity selectors.
Whitespaces are now allowed in entity selectors & blockstate arguments.
/locate now accepts different structure names for all structures previously grouped under Temple: Desert_Pyramid, Igloo, Jungle_Pyramid, and Swamp_Hut.
18w08aAdded a clickable teleport link to the /locate command output.
18w19aThe output of the /seed command can now be copied.
18w20aTeams now have a prefix and a suffix.
pre7Added /scoreboard objectives modify <objective> displayname <displayName>.
pre8Added /team modify <team> displayName.
Added /scoreboard objectives modify <objective> rendertype hearts, which makes health bars display as hearts, like this: Heart.svgHeart.svgHeart.svgHeart.svgHeart.svgHeart.svg.
Added /scoreboard objectives modify <objective> rendertype integer, which makes health bars display as yellow numbers.
Team names & objective names are now text components, not raw strings.
/team option is now /team modify.
1.13.118w31a Added /chunk.
pre1Renamed /chunk to /forceload.
September 26, 2018Brigadier open-sourced under the MIT license. (Source code previously was available on the library site, with no license specified).
Em breve na Edição Java
1.1418w43aAdded /drop and /schedule.
/replaceitem can now be used on item frames.
Edição Pocket Alpha
0.7.4Added support for commands, though none are implemented yet.
0.16.0build 1Added /clearfixedinv, /clone, /deop, /execute, /fill, /gamemode, /give, /help (with alias /?), /kill, /list, /op, /say, /setblock, /setfixedinvslot, /setworldspawn, /spawnpoint, /summon, /tell (with aliases /msg and /w), /testforblock, /testforblocks, /time, /toggledownfall, /tp (with alias /teleport), /weather, /wsserver and /xp.
Functionality of most commands is equivalent to Java Edition 1.10 usage. Differences include: no support for datatags, /clone cannot use forced cloneMode, /gamemode can only use Creative and Survival modes, the player target is optional in /give, and the entity target is optional in /execute.
build 2Removed /clearfixedinv and /setfixedinvslot, along with other Education Edition -related items.
build 5Added /enchant.
Edição Pocket
1.0build 1Added /locate and /connect.
build 2Removed /locate.
build 3Re-added /locate. Only works for strongholds.
1.0.3build 1Added /transferserver.
1.0.5build 1Added /clear, /difficulty, /effect, /gamerule, /me, /particle, /playsound, /replaceitem, /spreadplayers, /stopsound, /testfor and /title.
build 2Removed /particle.
The amplifier on /effect can no longer have negative values.
1.1build 1The canplaceon and candestroy are now supported for /replaceitem.
/locate can now find other structures.
Added the dodaylightcycle, doentitydrops, dofiretick, domobspawning, domobloot, dotiledrops, doweathercycle, keepinventory and mobgriefing gamerules.
1.1Added /setmaxplayers.
Edição Bedrock
1.2build 1Added /tickingarea.
1.6beta 1.6.0.6Added the doinsomnia gamerule.
1.7beta 1.7.0.2Added /scoreboard.
Added the commandblocksenabled gamerule.
Em breve na Edição Bedrock
1.8beta 1.8.0.8Readded /particle.
Added the randomTickSpeed gamerule.
Added /reload.

Issues[editar | editar código-fonte]

Problemas relacionados com "Traduções/comandos" são mantidos no rastreador de problemas. Reporte problemas lá.

See also[editar | editar código-fonte]