Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands: Difference between revisions

From SAS Gaming Wiki
imported>RedX
m Revert edits by ~2026-CreeperSwampGolem8267 (talk)
 
SyncBot (talk | contribs)
Remove broken links to missing pages
Line 3: Line 3:
{{Redirect|Code|the command|Commands/code}}
{{Redirect|Code|the command|Commands/code}}
[[File:Introduction-to-commands.jpg|thumb|Showcase of using {{Command|time}} to change the time in ''Minecraft'']]
[[File:Introduction-to-commands.jpg|thumb|Showcase of using {{Command|time}} to change the time in ''Minecraft'']]
'''Commands''' (also known as '''console commands''' or '''slash commands''') are an advanced game mechanic that execute specific actions when entered as text or triggered by blocks or certain [[Minecraft:entities]].
'''Commands''' (also known as '''console commands''' or '''slash commands''') are an advanced game mechanic that execute specific actions when entered as text or triggered by blocks or certain entities.


== Usage ==
== Usage ==
[[File:Command Block UI 1.21.5.png|thumb|The interface of a command block in {{JE}}]]
[[File:Command Block UI 1.21.5.png|thumb|The interface of a command block in {{JE}}]]
[[File:Command Block UI BE.png|thumb|The interface of a command block in {{BE}}]]
[[File:Command Block UI BE.png|thumb|The interface of a command block in {{BE}}]]
In the client, commands are entered via the [[Minecraft:chat]] window, which is displayed by pressing the {{key|T}} / {{key|Return}} / [[File:Chat button.png|25px]]{{only|bedrock|short=1}} / {{Xbutton|onedpad-right}}{{only|bedrock|short=1}} or {{key|/}} key. Using the {{key|/}} key also enters the forward-slash that commands require as a prefix, so it is a useful shortcut. The {{key|Up}} / {{Xbutton|onedpad-up}} and {{key|Down}} / {{Xbutton|onedpad-down}} keys can be used to view previously entered text, including all previously executed commands.
In the client, commands are entered via the chat window, which is displayed by pressing the {{key|T}} / {{key|Return}} / [[File:Chat button.png|25px]]{{only|bedrock|short=1}} / {{Xbutton|onedpad-right}}{{only|bedrock|short=1}} or {{key|/}} key. Using the {{key|/}} key also enters the forward-slash that commands require as a prefix, so it is a useful shortcut. The {{key|Up}} / {{Xbutton|onedpad-up}} and {{key|Down}} / {{Xbutton|onedpad-down}} keys can be used to view previously entered text, including all previously executed commands.


When the cursor is at a location corresponding to some types of argument (such as an entity ID), a list of applicable values appears above the text box. If the argument already contains characters, the list displays only those values containing the typed text. Pressing {{key|Tab}} while entering commands cycles through possible commands or arguments, and can be used to auto-enter them.
When the cursor is at a location corresponding to some types of argument (such as an entity ID), a list of applicable values appears above the text box. If the argument already contains characters, the list displays only those values containing the typed text. Pressing {{key|Tab}} while entering commands cycles through possible commands or arguments, and can be used to auto-enter them.
Line 14: Line 14:
Commands may also be entered in a multiplayer [[Minecraft:server]]'s console but are ''not'' preceded by a {{key|/}} when entered this way. A server owner running commands in this way is often referred to as "ghosting".
Commands may also be entered in a multiplayer [[Minecraft:server]]'s console but are ''not'' preceded by a {{key|/}} when entered this way. A server owner running commands in this way is often referred to as "ghosting".


Commands in [[Minecraft:command block]]s ''can'' be preceded by a slash, but it is not required.  
Commands in command blocks ''can'' be preceded by a slash, but it is not required.  


Commands can be executed in the following ways:
Commands can be executed in the following ways:
* Entered by a player in the chat screen.
* Entered by a player in the chat screen.
* Executed by a [[Minecraft:command block]] or a [[Minecraft:minecart with command block]].
* Executed by a command block or a minecart with command block.
* In a dedicated [[Minecraft:server]], entered in the console.
* In a dedicated [[Minecraft:server]], entered in the console.
* In [[Minecraft:function]]s, in a [[Minecraft:data pack]] or [[Minecraft:behavior pack]].
* In functions, in a data pack or [[Minecraft:behavior pack]].
* Clicking a [[Minecraft:text component]] that has "run_command" action.{{only|java|short=1}}
* Clicking a text component that has "run_command" action.{{only|java|short=1}}
* Requested by a WebSocket server connected to a client.{{only|bedrock|short=1}}
* Requested by a WebSocket server connected to a client.{{only|bedrock|short=1}}
* Clicking a dialog's [[Minecraft:Dialog#Action format|action button]].{{only|java|short=1}}
* Clicking a dialog's action button.{{only|java|short=1}}
* By an [[Minecraft:NPC]] dialogue.{{only|bedrock|short=1}}
* By an [[Minecraft:NPC]] dialogue.{{only|bedrock|short=1}}
* In scripts, in a [[Minecraft:behavior pack]].{{only|bedrock|short=1}}
* In scripts, in a [[Minecraft:behavior pack]].{{only|bedrock|short=1}}
Line 30: Line 30:
* In an entity event response, in a [[Minecraft:behavior pack]].{{only|bedrock|short=1}}
* In an entity event response, in a [[Minecraft:behavior pack]].{{only|bedrock|short=1}}
[[File:Command macro toast.png|thumb|The [[Toasts|toast]] that appears when a command macro fails]]
[[File:Command macro toast.png|thumb|The [[Toasts|toast]] that appears when a command macro fails]]
{{IN|be}}, commands can be executed through specified [[Minecraft:hotkeys]] on keyboard & mouse controls, known as '''command macros'''. The keybinds with commands can be customized below all other keybinds in the settings. For up to 10 macros, a command can be entered in a text input, which can be quickly executed in-game by pressing {{Keys|Alt+''Key''}}. Command macros can be preceded by a slash, but it is not required. This feature is not to be confused with ''Java Edition''<nowiki/>'s function macros, where functions may reference additional parameters and use them in ''macro lines'' (see {{slink|Function (Java Edition)|Macros}}).
{{IN|be}}, commands can be executed through specified hotkeys on keyboard & mouse controls, known as '''command macros'''. The keybinds with commands can be customized below all other keybinds in the settings. For up to 10 macros, a command can be entered in a text input, which can be quickly executed in-game by pressing {{Keys|Alt+''Key''}}. Command macros can be preceded by a slash, but it is not required. This feature is not to be confused with ''Java Edition''<nowiki/>'s function macros, where functions may reference additional parameters and use them in ''macro lines'' (see {{slink|Function (Java Edition)|Macros}}).


== Commands guide ==
== Commands guide ==
Line 93: Line 93:


==== Cheats ====
==== Cheats ====
Cheats can be enabled when [[Minecraft:Create New World|creating a new world]] by Allow Commands{{only|je}} / Cheats{{only|be}} options.
Cheats can be enabled when creating a new world by Allow Commands{{only|je}} / Cheats{{only|be}} options.


{{IN|java}}, the "Allow Commands" option when creating a new world only affects the player in a singleplayer world or the owner of a LAN world. The "Allow Commands" option when opening a LAN world affects all players in the LAN world.
{{IN|java}}, the "Allow Commands" option when creating a new world only affects the player in a singleplayer world or the owner of a LAN world. The "Allow Commands" option when opening a LAN world affects all players in the LAN world.


{{IN|java}}, in singleplayer worlds where cheats were not enabled at creation, they can be enabled on a temporary basis by opening the current game session to LAN play ( {{key|Esc}} → "Open to LAN", then "Allow Cheats" button and "Start LAN World"). The player does not actually need to be on a LAN or have others join. This is not permanent but allows the use of commands until the player quits the world, and changes the player makes via commands (items spawned, etc.) are saved with the world. The player can do this each time the player starts playing the world again. Note that this disables game pausing for the duration, so while open to LAN, the player should get somewhere safe or reload their world before using the Game Menu. The player can disable the LAN world by reloading the world. To permanently enable cheats, the [[Minecraft:Java Edition level format#level.dat format|level.dat]] file has to be edited.  
{{IN|java}}, in singleplayer worlds where cheats were not enabled at creation, they can be enabled on a temporary basis by opening the current game session to LAN play ( {{key|Esc}} → "Open to LAN", then "Allow Cheats" button and "Start LAN World"). The player does not actually need to be on a LAN or have others join. This is not permanent but allows the use of commands until the player quits the world, and changes the player makes via commands (items spawned, etc.) are saved with the world. The player can do this each time the player starts playing the world again. Note that this disables game pausing for the duration, so while open to LAN, the player should get somewhere safe or reload their world before using the Game Menu. The player can disable the LAN world by reloading the world. To permanently enable cheats, the level.dat file has to be edited.  


{{IN|bedrock}}, cheats can be toggled at any time in the "Cheats" tab of the settings menu. Enabling cheats in a world permanently prevents players from unlocking [[Minecraft:achievement]]s in that world, even if cheats are later turned off. In [[Minecraft:Bedrock Dedicated Server]], {{cmd|changesetting}} command can be used to toggle cheats.
{{IN|bedrock}}, cheats can be toggled at any time in the "Cheats" tab of the settings menu. Enabling cheats in a world permanently prevents players from unlocking [[Minecraft:achievement]]s in that world, even if cheats are later turned off. In [[Minecraft:Bedrock Dedicated Server]], {{cmd|changesetting}} command can be used to toggle cheats.
Line 103: Line 103:
=== Argument types ===
=== Argument types ===
{{main|Argument types}}
{{main|Argument types}}
There are different argument types for arguments in commands. [[Minecraft:Coordinates]], [[Minecraft:target selector]], [[Minecraft:SNBT]], [[Minecraft:text component]], and so on are commonly used formats in arguments.
There are different argument types for arguments in commands. [[Minecraft:Coordinates]], target selector, SNBT, text component, and so on are commonly used formats in arguments.


=== Parsing and execution ===
=== Parsing and execution ===
Line 110: Line 110:
The command performing on the server side is divided into two stages: '''command parsing''' and '''command execution'''. During the command parsing stage, the game identifies the string as a command and checks whether the command is complete and whether arguments are specified correctly. During the command execution stage, the command fulfills its purpose.
The command performing on the server side is divided into two stages: '''command parsing''' and '''command execution'''. During the command parsing stage, the game identifies the string as a command and checks whether the command is complete and whether arguments are specified correctly. During the command execution stage, the command fulfills its purpose.


When typing a command in the chat, or [[Minecraft:command block]], the command is also be parsed '''in the client side''' first to provide autocompletion and help the player detect typing mistakes.
When typing a command in the chat, or command block, the command is also be parsed '''in the client side''' first to provide autocompletion and help the player detect typing mistakes.
: When typing an argument into the chat, it's noticeable if an argument cannot be parsed in the client side. However, being able to be parsed in the client side does '''not''' guarantee that this argument can be parsed in the server side.
: When typing an argument into the chat, it's noticeable if an argument cannot be parsed in the client side. However, being able to be parsed in the client side does '''not''' guarantee that this argument can be parsed in the server side.
::{{IN|java}}, if an argument can't be parsed by the client, the argument is marked in red, and a syntax error message is displayed above the chat bar.
::{{IN|java}}, if an argument can't be parsed by the client, the argument is marked in red, and a syntax error message is displayed above the chat bar.
::{{IN|bedrock}}, when typing in the chat, if an argument can be parsed in the client side, the next argument in syntax hint turns to white from gray. If all arguments (including optional arguments) are entered and parseable in the client side, the whole syntax hint turns to gray from white.  
::{{IN|bedrock}}, when typing in the chat, if an argument can be parsed in the client side, the next argument in syntax hint turns to white from gray. If all arguments (including optional arguments) are entered and parseable in the client side, the whole syntax hint turns to gray from white.  
:{{IN|java}}, typing a command in [[Minecraft:command block]] also behaves as above
:{{IN|java}}, typing a command in command block also behaves as above
:{{IN|bedrock}}, when typing a command in [[Minecraft:command block]], autocompletion is provided without syntax hint.
:{{IN|bedrock}}, when typing a command in command block, autocompletion is provided without syntax hint.


{{IN|bedrock}}, when entering into a command block, the command is parsed on the server side once the command block screen is closed. If the command is unparseable in the server side, a syntax error message is outputted into its output box.
{{IN|bedrock}}, when entering into a command block, the command is parsed on the server side once the command block screen is closed. If the command is unparseable in the server side, a syntax error message is outputted into its output box.
Line 123: Line 123:
:{{IN|bedrock}}, the message is <code>Unknown command</code> or <code>Syntax error: unexpected ... at ...</code>.
:{{IN|bedrock}}, the message is <code>Unknown command</code> or <code>Syntax error: unexpected ... at ...</code>.


Commands in [[Minecraft:functions]] are all parsed when loading the function. If any command in a function file is unparseable, the function cannot be loaded by the game. {{IN|java}}, macro lines are parsed when attempting to run the function, see also {{slink|Function (Java Edition)|Macros}} and {{slink|Function (Java Edition)|Loading and parsing}}.
Commands in functions are all parsed when loading the function. If any command in a function file is unparseable, the function cannot be loaded by the game. {{IN|java}}, macro lines are parsed when attempting to run the function, see also {{slink|Function (Java Edition)|Macros}} and {{slink|Function (Java Edition)|Loading and parsing}}.


{{IN|be}}, if a command in a script is unparseable, an error is thrown when trying to execute the command.
{{IN|be}}, if a command in a script is unparseable, an error is thrown when trying to execute the command.
Line 130: Line 130:
After trying to execute a command, it may yield '''output values''', including '''success count''' and '''stored values'''{{only|je}}.
After trying to execute a command, it may yield '''output values''', including '''success count''' and '''stored values'''{{only|je}}.


Success count is the value a command passes to the command block executing it. A command block can power a [[Minecraft:redstone comparator]] facing away from it (may be separated by a block) with signal strength being the success count. The signal strength reflects the success count of the last command executed. Even after the command block is deactivated, the success count is retained until the command is executed again. {{IN|be}}, the success count is also returned to the script executing the command. {{IN|java}}, commands that cannot be executed in command blocks have no success count. {{IN|bedrock}}, commands that cannot be executed in command blocks or scripts still have a success count, but it cannot be obtained. {{IN|je}}, success count is always 0 or 1, except the {{cmd|execute}} command. {{IN|be}}, success count is an integer between 0 to 2,147,483,647 (both inclusive) related to the command (e.g., the number of players affected by the command, the number of blocks that were altered, etc.)
Success count is the value a command passes to the command block executing it. A command block can power a redstone comparator facing away from it (may be separated by a block) with signal strength being the success count. The signal strength reflects the success count of the last command executed. Even after the command block is deactivated, the success count is retained until the command is executed again. {{IN|be}}, the success count is also returned to the script executing the command. {{IN|java}}, commands that cannot be executed in command blocks have no success count. {{IN|bedrock}}, commands that cannot be executed in command blocks or scripts still have a success count, but it cannot be obtained. {{IN|je}}, success count is always 0 or 1, except the {{cmd|execute}} command. {{IN|be}}, success count is an integer between 0 to 2,147,483,647 (both inclusive) related to the command (e.g., the number of players affected by the command, the number of blocks that were altered, etc.)


Stored values{{only|je|short=1}} include {{cd|success}} value and {{cd|result}} value, which are the values passed by other commands to the {{cmd|execute}} command, when a command is executed by a {{cmd|execute}} command. These two values can be stored to a specified location by the {{cd|store}} subcommand in the {{cmd|execute}} command. The {{cd|success}} value is always 0 or 1. The {{cd|result}} value is an integer (rounded down if not). All commands may yield these two stored values after execution, with only two exceptions: {{cmd|execute}} command itself does not yield these two stored values; {{cmd|function}} command may not yield these two stored values in certain situation.
Stored values{{only|je|short=1}} include {{cd|success}} value and {{cd|result}} value, which are the values passed by other commands to the {{cmd|execute}} command, when a command is executed by a {{cmd|execute}} command. These two values can be stored to a specified location by the {{cd|store}} subcommand in the {{cmd|execute}} command. The {{cd|success}} value is always 0 or 1. The {{cd|result}} value is an integer (rounded down if not). All commands may yield these two stored values after execution, with only two exceptions: {{cmd|execute}} command itself does not yield these two stored values; {{cmd|function}} command may not yield these two stored values in certain situation.
Line 149: Line 149:
;Terminated{{only|java|short=1}}
;Terminated{{only|java|short=1}}
:Exclusive to {{cmd|execute}} command. When running a {{cmd|execute}} command, if the number of execution branches becomes 0, the command terminates, ending before the last sub-command is executed.
:Exclusive to {{cmd|execute}} command. When running a {{cmd|execute}} command, if the number of execution branches becomes 0, the command terminates, ending before the last sub-command is executed.
:For example: {{cmd|execute as @s run ...}} in a command block. The command block is not an entity, so it cannot be selected by a [[Minecraft:target selector]]. As a result, the command is terminated at {{cd|as @s}}.
:For example: {{cmd|execute as @s run ...}} in a command block. The command block is not an entity, so it cannot be selected by a target selector. As a result, the command is terminated at {{cd|as @s}}.


;Failed and Successful
;Failed and Successful
Line 167: Line 167:
! style="text-align:left;" | Command
! style="text-align:left;" | Command
! style="text-align:left;" class="unsortable" | Description
! style="text-align:left;" class="unsortable" | Description
! style="padding:0.4em;" | {{Tooltip|[[Minecraft:OP level]] required|Permission level required to perform the command}}
! style="padding:0.4em;" | {{Tooltip|OP level required|Permission level required to perform the command}}
! style="padding:0.4em;" | {{Tooltip|Multiplayer only|Commands usable only in multiplayer}}
! style="padding:0.4em;" | {{Tooltip|Multiplayer only|Commands usable only in multiplayer}}
! style="padding:0.2em;" | {{Tooltip|{{EnvSprite|blocks}}|Command modifies or queries blocks}}
! style="padding:0.2em;" | {{Tooltip|{{EnvSprite|blocks}}|Command modifies or queries blocks}}
Line 175: Line 175:
|-
|-
| style="text-align:left;" |{{cmd|advancement}}
| style="text-align:left;" |{{cmd|advancement}}
| style="text-align:left;" |Gives, removes, or checks player [[Minecraft:advancement]]s.
| style="text-align:left;" |Gives, removes, or checks player advancements.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
Line 220: Line 220:
|-
|-
| style="text-align:left;" |{{cmd|data}}
| style="text-align:left;" |{{cmd|data}}
| style="text-align:left;" |Gets, merges, modifies, and removes [[Minecraft:block entity]], [[Minecraft:entity]], and [[Minecraft:Command storage format|command storage]] NBT data.
| style="text-align:left;" |Gets, merges, modifies, and removes [[Minecraft:block entity]], entity, and command storage NBT data.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|{{EnvSprite|blocks}}}} || {{tc|yes|{{EnvSprite|mobs}}}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
| {{tc|yes|{{EnvSprite|blocks}}}} || {{tc|yes|{{EnvSprite|mobs}}}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
Line 235: Line 235:
|-
|-
| style="text-align:left;" |{{cmd|defaultgamemode}}
| style="text-align:left;" |{{cmd|defaultgamemode}}
| style="text-align:left;" |Sets the default [[Minecraft:game mode]].
| style="text-align:left;" |Sets the default game mode.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
Line 255: Line 255:
|-
|-
| style="text-align:left;" |{{cmd|effect}}
| style="text-align:left;" |{{cmd|effect}}
| style="text-align:left;" |Adds or removes [[Minecraft:status effect]]s.
| style="text-align:left;" |Adds or removes status effects.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|yes|{{EnvSprite|mobs}}}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
| {{tc|-}} || {{tc|yes|{{EnvSprite|mobs}}}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
Line 270: Line 270:
|-
|-
| style="text-align:left;" |{{cmd|experience}}
| style="text-align:left;" |{{cmd|experience}}
| style="text-align:left;" |An alias of {{cmd|xp}}. Adds or removes player [[Minecraft:experience]].
| style="text-align:left;" |An alias of {{cmd|xp}}. Adds or removes player experience.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
Line 290: Line 290:
|-
|-
| style="text-align:left;" |{{cmd|forceload}}
| style="text-align:left;" |{{cmd|forceload}}
| style="text-align:left;" |Forces [[Minecraft:chunk]]s to constantly be loaded or not.
| style="text-align:left;" |Forces chunks to constantly be loaded or not.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
|-
|-
| style="text-align:left;" |{{cmd|function}}
| style="text-align:left;" |{{cmd|function}}
| style="text-align:left;" |Runs a [[Minecraft:function]].
| style="text-align:left;" |Runs a function.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
|-
|-
| style="text-align:left;" |{{cmd|gamemode}}
| style="text-align:left;" |{{cmd|gamemode}}
| style="text-align:left;" |Sets a player's [[Minecraft:game mode]].
| style="text-align:left;" |Sets a player's game mode.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
|-
|-
| style="text-align:left;" |{{cmd|gamerule}}
| style="text-align:left;" |{{cmd|gamerule}}
| style="text-align:left;" |Sets or queries a [[Minecraft:game rule]] value.
| style="text-align:left;" |Sets or queries a game rule value.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
Line 550: Line 550:
|-
|-
| style="text-align:left;" |{{cmd|test}}
| style="text-align:left;" |{{cmd|test}}
| style="text-align:left;" |Manage and execute [[Minecraft:GameTests]].
| style="text-align:left;" |Manage and execute GameTests.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|-}}
Line 600: Line 600:
|-
|-
| style="text-align:left;" |{{cmd|waypoint}}
| style="text-align:left;" |{{cmd|waypoint}}
| style="text-align:left;" |Manages waypoints displayed on the [[Minecraft:locator bar]].
| style="text-align:left;" |Manages waypoints displayed on the locator bar.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
Line 615: Line 615:
|-
|-
| style="text-align:left;" |{{cmd|worldborder}}
| style="text-align:left;" |{{cmd|worldborder}}
| style="text-align:left;" |Manages the [[Minecraft:world border]].
| style="text-align:left;" |Manages the world border.
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|default}}}}
|-
|-
| style="text-align:left;" |{{cmd|xp}}
| style="text-align:left;" |{{cmd|xp}}
| style="text-align:left;" |An alias of {{cmd|experience}}. Adds or removes player [[Minecraft:experience]].  
| style="text-align:left;" |An alias of {{cmd|experience}}. Adds or removes player experience.  
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
Line 628: Line 628:
{{debug warning|plural=1|section=1}}
{{debug warning|plural=1|section=1}}


Debugging commands are not accessible by default, but can be enabled using [[Minecraft:debug properties]].
Debugging commands are not accessible by default, but can be enabled using debug properties.


{| class="wikitable sortable mw-collapsible" style="text-align:center;"
{| class="wikitable sortable mw-collapsible" style="text-align:center;"
! style="text-align:left;" | Command
! style="text-align:left;" | Command
! style="text-align:left;" class="unsortable" | Description
! style="text-align:left;" class="unsortable" | Description
! {{Tooltip|[[Minecraft:OP level]] required|Permission level required to perform the command}}
! {{Tooltip|OP level required|Permission level required to perform the command}}
! {{Tooltip|Multiplayer only|Commands usable only in multiplayer}}
! {{Tooltip|Multiplayer only|Commands usable only in multiplayer}}
! {{Tooltip|{{EnvSprite|blocks}}|Command modifies or queries blocks}}
! {{Tooltip|{{EnvSprite|blocks}}|Command modifies or queries blocks}}
Line 642: Line 642:
|-
|-
| style="text-align:left;" |{{cmd|warden_spawn_tracker}}
| style="text-align:left;" |{{cmd|warden_spawn_tracker}}
| style="text-align:left;" |Shows how many warnings a [[Minecraft:sculk shrieker]] has before spawning a [[Minecraft:warden]].
| style="text-align:left;" |Shows how many warnings a sculk shrieker has before spawning a [[Minecraft:warden]].
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
Line 658: Line 658:
|-
|-
| style="text-align:left;" | {{cmd|raid}}
| style="text-align:left;" | {{cmd|raid}}
| style="text-align:left;" | Starts a [[Minecraft:raid]]
| style="text-align:left;" | Starts a raid
| {{tc|yes|3}} || {{tc|-}}
| {{tc|yes|3}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|-}} || {{tc|-}}
Line 691: Line 691:
! {{Tooltip|''BE''|Available in Bedrock Edition}}
! {{Tooltip|''BE''|Available in Bedrock Edition}}
! {{Tooltip|''edu''|Available in Minecraft Education}}
! {{Tooltip|''edu''|Available in Minecraft Education}}
! {{Tooltip|[[Minecraft:OP level]] required|Command permission level required to perform the command}}
! {{Tooltip|OP level required|Command permission level required to perform the command}}
! {{Tooltip|Server only|Commands usable only in servers}}
! {{Tooltip|Server only|Commands usable only in servers}}
! {{Tooltip|{{EnvSprite|blocks}}|Command modifies or queries blocks}}
! {{Tooltip|{{EnvSprite|blocks}}|Command modifies or queries blocks}}
Line 813: Line 813:
|-
|-
| style="text-align:left;" |{{cmd|effect}}
| style="text-align:left;" |{{cmd|effect}}
| style="text-align:left;" |Adds or removes [[Minecraft:status effect]]s.
| style="text-align:left;" |Adds or removes status effects.
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes|1}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
Line 849: Line 849:
|-
|-
| style="text-align:left;" |{{cmd|function}}
| style="text-align:left;" |{{cmd|function}}
| style="text-align:left;" |Runs a [[Minecraft:function]].
| style="text-align:left;" |Runs a function.
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes|1}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
Line 855: Line 855:
|-
|-
| style="text-align:left;" |{{cmd|gamemode}}
| style="text-align:left;" |{{cmd|gamemode}}
| style="text-align:left;" |Sets a player's [[Minecraft:game mode]].
| style="text-align:left;" |Sets a player's game mode.
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes|1}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
Line 861: Line 861:
|-
|-
| style="text-align:left;" |{{cmd|gamerule}}
| style="text-align:left;" |{{cmd|gamerule}}
| style="text-align:left;" |Sets or queries a [[Minecraft:game rule]] value.
| style="text-align:left;" |Sets or queries a game rule value.
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes|1}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
Line 873: Line 873:
|-
|-
| style="text-align:left;" |{{cmd|gametips}}
| style="text-align:left;" |{{cmd|gametips}}
| style="text-align:left;" |Enable or disable the [[Minecraft:game tips]] on this device.
| style="text-align:left;" |Enable or disable the game tips on this device.
| {{tc|yes}} || {{tc|-}}
| {{tc|yes}} || {{tc|-}}
| {{tc|yes|0}} || {{tc|-}}
| {{tc|yes|0}} || {{tc|-}}
Line 891: Line 891:
|-
|-
| style="text-align:left;" |{{cmd|hud}}
| style="text-align:left;" |{{cmd|hud}}
| style="text-align:left;" |Changes the visibility of a [[Minecraft:HUD|HUD element]].
| style="text-align:left;" |Changes the visibility of a HUD element.
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes|1}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
Line 903: Line 903:
|-
|-
| style="text-align:left;" | {{cmd|inputpermission}}
| style="text-align:left;" | {{cmd|inputpermission}}
| style="text-align:left;" | Specify the operation for the player's [[Minecraft:permission]] status.
| style="text-align:left;" | Specify the operation for the player's permission status.
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes|1}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
Line 1,005: Line 1,005:
|-
|-
| style="text-align:left;" |{{cmd|project}}
| style="text-align:left;" |{{cmd|project}}
| style="text-align:left;" |Contains tools for managing [[Minecraft:Editor]] projects.
| style="text-align:left;" |Contains tools for managing Editor projects.
| {{tc|yes}} || {{tc|-}}
| {{tc|yes}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
Line 1,274: Line 1,274:
|-
|-
| style="text-align:left;" |{{cmd|xp}}
| style="text-align:left;" |{{cmd|xp}}
| style="text-align:left;" |Adds or removes player [[Minecraft:experience]].  
| style="text-align:left;" |Adds or removes player experience.  
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes}} || {{tc|yes}}
| {{tc|yes|1}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
Line 1,289: Line 1,289:
! {{Tooltip|''BE''|Available in Bedrock Edition}}
! {{Tooltip|''BE''|Available in Bedrock Edition}}
! {{Tooltip|''edu''|Available in Minecraft Education}}
! {{Tooltip|''edu''|Available in Minecraft Education}}
! {{Tooltip|[[Minecraft:OP level]] required|Command permission level required to perform the command}}
! {{Tooltip|OP level required|Command permission level required to perform the command}}
! {{Tooltip|Server only|Commands usable only in servers}}
! {{Tooltip|Server only|Commands usable only in servers}}
! {{Tooltip|{{EnvSprite|blocks}}|Command modifies or queries blocks}}
! {{Tooltip|{{EnvSprite|blocks}}|Command modifies or queries blocks}}
Line 1,465: Line 1,465:
| style="text-align:left;" |{{cmd|?}}
| style="text-align:left;" |{{cmd|?}}
| style="text-align:left;" |An alias of {{cmd|help}}. Provides help for commands.
| style="text-align:left;" |An alias of {{cmd|help}}. Provides help for commands.
| data-sort-value="4 1.13 17w45a" |{{nowrap|[[Minecraft:Java Edition 1.13]]}}<br>([[Minecraft:Java Edition 17w45a|17w45a]])
| data-sort-value="4 1.13 17w45a" |{{nowrap|Java Edition 1.13}}<br>(17w45a)
|'''?'''
|'''?'''
| {{tc|no|0}} || {{tc|-}}
| {{tc|no|0}} || {{tc|-}}
Line 1,473: Line 1,473:
<span class="nowrap">{{cmd|achievement}}</span>
<span class="nowrap">{{cmd|achievement}}</span>
| style="text-align:left;" |Gives or takes an achievement from a player
| style="text-align:left;" |Gives or takes an achievement from a player
| data-sort-value="4 1.12 17w13a" |{{nowrap|[[Minecraft:Java Edition 1.12]]}}<br>([[Minecraft:Java Edition 17w13a|17w13a]])
| data-sort-value="4 1.12 17w13a" |{{nowrap|Java Edition 1.12}}<br>(17w13a)
| style="text-align:left;" |[[Minecraft:Achievements]] were superseded by [[Minecraft:advancements]]
| style="text-align:left;" |Achievements were superseded by advancements
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
| {{tc|-}} || {{tc|-}} || {{tc|yes|{{EnvSprite|player}}}} || {{tc|-}}
Line 1,480: Line 1,480:
| style="text-align:left;" |<span class="nowrap">{{cmd|banip}}</span>
| style="text-align:left;" |<span class="nowrap">{{cmd|banip}}</span>
| style="text-align:left;" |Bans a player by IP number
| style="text-align:left;" |Bans a player by IP number
| data-sort-value="2 0.31" |{{nowrap|[[Minecraft:Java Edition Indev 0.31]]}}
| data-sort-value="2 0.31" |{{nowrap|Java Edition Indev 0.31}}
| style="text-align:left;" |Superseded by {{cmd|ban-ip}}
| style="text-align:left;" |Superseded by {{cmd|ban-ip}}
| {{tc|yes|3}} || {{tc|yes}}
| {{tc|yes|3}} || {{tc|yes}}
Line 1,487: Line 1,487:
| style="text-align:left;" |{{nowrap|{{cmd|blockdata}}}}
| style="text-align:left;" |{{nowrap|{{cmd|blockdata}}}}
| style="text-align:left;" |Modifies the data tag of a block
| style="text-align:left;" |Modifies the data tag of a block
| data-sort-value="4 1.13 17w47a" |{{nowrap|[[Minecraft:Java Edition 1.13]]}}<br>([[Minecraft:Java Edition 17w47a|17w47a]])
| data-sort-value="4 1.13 17w47a" |{{nowrap|Java Edition 1.13}}<br>([[Minecraft:Java Edition 17w47a|17w47a]])
| style="text-align:left;" |Superseded by {{cmd|data}}
| style="text-align:left;" |Superseded by {{cmd|data}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,494: Line 1,494:
| style="text-align:left;" |{{nowrap|{{cmd|broadcast}}}}
| style="text-align:left;" |{{nowrap|{{cmd|broadcast}}}}
| style="text-align:left;" |Broadcasts a message across the entire server
| style="text-align:left;" |Broadcasts a message across the entire server
| data-sort-value="1 0.0.16a_01" |[[Minecraft:Java Edition Classic 0.0.16a_01]]
| data-sort-value="1 0.0.16a_01" |Java Edition Classic 0.0.16a_01
| style="text-align:left;" |Superseded by {{cmd|say}}
| style="text-align:left;" |Superseded by {{cmd|say}}
| {{tc|yes|1}} || {{tc|-}}
| {{tc|yes|1}} || {{tc|-}}
Line 1,501: Line 1,501:
| style="text-align:left;" |{{nowrap|{{cmd|chunk|link=none}}}}
| style="text-align:left;" |{{nowrap|{{cmd|chunk|link=none}}}}
| style="text-align:left;" |Force chunks to load constantly or not
| style="text-align:left;" |Force chunks to load constantly or not
| data-sort-value="4 1.13.1 pre1" |{{nowrap|[[Minecraft:Java Edition 1.13.1]]}}<br>([[Minecraft:Java Edition 1.13.1-pre1|pre1]])
| data-sort-value="4 1.13.1 pre1" |{{nowrap|Java Edition 1.13.1}}<br>(pre1)
| style="text-align:left;" |Superseded by {{cmd|forceload}}
| style="text-align:left;" |Superseded by {{cmd|forceload}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,508: Line 1,508:
| style="text-align:left;" |{{nowrap|{{cmd|entitydata}}}}
| style="text-align:left;" |{{nowrap|{{cmd|entitydata}}}}
| style="text-align:left;" |Modifies the data tag of an entity
| style="text-align:left;" |Modifies the data tag of an entity
| data-sort-value="4 1.13 17w45b" |{{nowrap|[[Minecraft:Java Edition 1.13]]}}<br>([[Minecraft:Java Edition 17w45b|17w45b]])
| data-sort-value="4 1.13 17w45b" |{{nowrap|Java Edition 1.13}}<br>(17w45b)
| style="text-align:left;" |Superseded by {{cmd|data}}
| style="text-align:left;" |Superseded by {{cmd|data}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,515: Line 1,515:
| style="text-align:left;" |{{nowrap|{{cmd|home}}}}
| style="text-align:left;" |{{nowrap|{{cmd|home}}}}
| style="text-align:left;" |Teleports player to the [[Minecraft:world spawn]]
| style="text-align:left;" |Teleports player to the [[Minecraft:world spawn]]
| data-sort-value="3 1.2.5" |{{nowrap|[[Minecraft:Java Edition Alpha v1.2.5]]}}
| data-sort-value="3 1.2.5" |{{nowrap|Java Edition Alpha v1.2.5}}
| style="text-align:left;" |Superseded by {{cmd|kill}}
| style="text-align:left;" |Superseded by {{cmd|kill}}
| {{tc|no|0}} || {{tc|-}}
| {{tc|no|0}} || {{tc|-}}
Line 1,522: Line 1,522:
| style="text-align:left;" |{{cmd|locatebiome}}
| style="text-align:left;" |{{cmd|locatebiome}}
| style="text-align:left;" |Locates biomes
| style="text-align:left;" |Locates biomes
| data-sort-value="4" 1.19 22w19a |{{nowrap|[[Minecraft:Java Edition 1.19]]<br>([[Minecraft:22w19a]])}}
| data-sort-value="4" 1.19 22w19a |{{nowrap|Java Edition 1.19<br>(22w19a)}}
| style="text-align:left;" |Superseded by {{cmd|locate}}
| style="text-align:left;" |Superseded by {{cmd|locate}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,529: Line 1,529:
| style="text-align:left;" |{{cmd|placefeature}}
| style="text-align:left;" |{{cmd|placefeature}}
| style="text-align:left;" |Used to place a configured feature at a given location
| style="text-align:left;" |Used to place a configured feature at a given location
| data-sort-value="4 1.19 22w18a" |{{nowrap|[[Minecraft:Java Edition 1.19]]<br>([[Minecraft:Java Edition 22w18a|22w18a]])}}
| data-sort-value="4 1.19 22w18a" |{{nowrap|Java Edition 1.19<br>(22w18a)}}
| style="text-align:left;" |Superseded by {{cmd|place}}
| style="text-align:left;" |Superseded by {{cmd|place}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,536: Line 1,536:
| style="text-align:left;" |{{nowrap|{{cmd|replaceitem}}}}
| style="text-align:left;" |{{nowrap|{{cmd|replaceitem}}}}
| style="text-align:left;" |Replaces items in inventories
| style="text-align:left;" |Replaces items in inventories
| data-sort-value="4 1.17 20w46a" |{{nowrap|[[Minecraft:Java Edition 1.17]]}}<br>([[Minecraft:Java Edition 20w46a|20w46a]])
| data-sort-value="4 1.17 20w46a" |{{nowrap|Java Edition 1.17}}<br>(20w46a)
| style="text-align:left;" |Superseded by {{cmd|item}}
| style="text-align:left;" |Superseded by {{cmd|item}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,543: Line 1,543:
| style="text-align:left;" |{{nowrap|{{cmd|setspawn}}}}
| style="text-align:left;" |{{nowrap|{{cmd|setspawn}}}}
| style="text-align:left;" |Sets the current location as the default spawn location for new players
| style="text-align:left;" |Sets the current location as the default spawn location for new players
| data-sort-value="2 0.31" |{{nowrap|[[Minecraft:Java Edition Indev 0.31]]}}
| data-sort-value="2 0.31" |{{nowrap|Java Edition Indev 0.31}}
| style="text-align:left;" |Superseded by {{cmd|setworldspawn}}
| style="text-align:left;" |Superseded by {{cmd|setworldspawn}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,550: Line 1,550:
| style="text-align:left;" |{{nowrap|{{cmd|solid}}}}
| style="text-align:left;" |{{nowrap|{{cmd|solid}}}}
| style="text-align:left;" |Toggles between placing stone or bedrock
| style="text-align:left;" |Toggles between placing stone or bedrock
| data-sort-value="2 0.31" |{{nowrap|[[Minecraft:Java Edition Indev 0.31]]}}
| data-sort-value="2 0.31" |{{nowrap|Java Edition Indev 0.31}}
| style="text-align:left;" |[[Minecraft:Bedrock]] was added to the Creative inventory as a separate item
| style="text-align:left;" |[[Minecraft:Bedrock]] was added to the Creative inventory as a separate item
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,557: Line 1,557:
| style="text-align:left;" |{{nowrap|{{cmd|stats}}}}
| style="text-align:left;" |{{nowrap|{{cmd|stats}}}}
| style="text-align:left;" |Update objectives from command results
| style="text-align:left;" |Update objectives from command results
| data-sort-value="4 1.13 17w45a" |{{nowrap|[[Minecraft:Java Edition 1.13]]}}<br>([[Minecraft:Java Edition 17w45a|17w45a]])
| data-sort-value="4 1.13 17w45a" |{{nowrap|Java Edition 1.13}}<br>(17w45a)
| style="text-align:left;" |Merged with {{cmd|execute}}
| style="text-align:left;" |Merged with {{cmd|execute}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,564: Line 1,564:
| style="text-align:left;" |{{cmd|testfor}}
| style="text-align:left;" |{{cmd|testfor}}
| style="text-align:left;" |Counts entities matching specified conditions.
| style="text-align:left;" |Counts entities matching specified conditions.
| data-sort-value="4 1.13 17w45a" |{{nowrap|[[Minecraft:Java Edition 1.13]]}}<br>([[Minecraft:Java Edition 17w45a|17w45a]])
| data-sort-value="4 1.13 17w45a" |{{nowrap|Java Edition 1.13}}<br>(17w45a)
| style="text-align:left;" |Merged with {{cmd|execute}}
| style="text-align:left;" |Merged with {{cmd|execute}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,571: Line 1,571:
| style="text-align:left;" |{{cmd|testforblock}}  
| style="text-align:left;" |{{cmd|testforblock}}  
| style="text-align:left;" |Tests whether a block is in a location.
| style="text-align:left;" |Tests whether a block is in a location.
| data-sort-value="4 1.13 17w45a" |{{nowrap|[[Minecraft:Java Edition 1.13]]}}<br>([[Minecraft:Java Edition 17w45a|17w45a]])
| data-sort-value="4 1.13 17w45a" |{{nowrap|Java Edition 1.13}}<br>(17w45a)
| style="text-align:left;" |Merged with {{cmd|execute}}
| style="text-align:left;" |Merged with {{cmd|execute}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,578: Line 1,578:
| style="text-align:left;" |{{cmd|testforblocks}}
| style="text-align:left;" |{{cmd|testforblocks}}
| style="text-align:left;" |Tests whether the blocks in two regions match.
| style="text-align:left;" |Tests whether the blocks in two regions match.
| data-sort-value="4 1.13 17w45a" |{{nowrap|[[Minecraft:Java Edition 1.13]]}}<br>([[Minecraft:Java Edition 17w45a|17w45a]])
| data-sort-value="4 1.13 17w45a" |{{nowrap|Java Edition 1.13}}<br>(17w45a)
| style="text-align:left;" |Merged with {{cmd|execute}}
| style="text-align:left;" |Merged with {{cmd|execute}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,585: Line 1,585:
| style="text-align:left;" |{{nowrap|{{cmd|toggledownfall}}}}
| style="text-align:left;" |{{nowrap|{{cmd|toggledownfall}}}}
| style="text-align:left;" |Toggles the weather
| style="text-align:left;" |Toggles the weather
| data-sort-value="4 1.13 17w45a" |{{nowrap|[[Minecraft:Java Edition 1.13]]}}<br>([[Minecraft:Java Edition 17w45a|17w45a]])
| data-sort-value="4 1.13 17w45a" |{{nowrap|Java Edition 1.13}}<br>(17w45a)
| style="text-align:left;" |Redundancy with {{cmd|weather}}
| style="text-align:left;" |Redundancy with {{cmd|weather}}
| {{tc|yes|2}} || {{tc|-}}
| {{tc|yes|2}} || {{tc|-}}
Line 1,592: Line 1,592:
| style="text-align:left;" |{{nowrap|{{cmd|unban}}}}
| style="text-align:left;" |{{nowrap|{{cmd|unban}}}}
| style="text-align:left;" |Pardons a banned player
| style="text-align:left;" |Pardons a banned player
| data-sort-value="3 1.0.16" |{{nowrap|[[Minecraft:Java Edition Alpha v1.0.16]]}}
| data-sort-value="3 1.0.16" |{{nowrap|Java Edition Alpha v1.0.16}}
| style="text-align:left;" |Superseded by {{cmd|pardon}}
| style="text-align:left;" |Superseded by {{cmd|pardon}}
| {{tc|yes|3}} || {{tc|yes}}
| {{tc|yes|3}} || {{tc|yes}}
Line 1,648: Line 1,648:
| style="text-align:left;" |{{cmd|position}}  
| style="text-align:left;" |{{cmd|position}}  
| style="text-align:left;" |Toggles player coordinates to be displayed on the HUD
| style="text-align:left;" |Toggles player coordinates to be displayed on the HUD
| data-sort-value="7 1.0.21" |{{nowrap|[[Minecraft:Education Edition 1.0.21]]}}
| data-sort-value="7 1.0.21" |{{nowrap|Education Edition 1.0.21}}
| style="text-align:left;" |Superseded by {{cmd|gamerule}}
| style="text-align:left;" |Superseded by {{cmd|gamerule}}
| {{tc|-}} || {{tc|no|Removed}}
| {{tc|-}} || {{tc|no|Removed}}
Line 1,741: Line 1,741:
=== Joke commands ===
=== Joke commands ===
{{exclusive|java|section=1}}
{{exclusive|java|section=1}}
These commands only exist in [[Minecraft:April Fools' Day jokes|April Fools' Day joke]] versions of the game.
These commands only exist in April Fools' Day joke versions of the game.


*{{cmd|debugdim}}
*{{cmd|debugdim}}
Line 1,779: Line 1,779:
|{{HistoryLine||1.0.0|dev=Beta 1.9 Prerelease 5|Added {{cmd|xp}} and {{cmd|toggledownfall}}.}}
|{{HistoryLine||1.0.0|dev=Beta 1.9 Prerelease 5|Added {{cmd|xp}} and {{cmd|toggledownfall}}.}}
|{{HistoryLine||1.3.1|dev=12w16a|Added cheats mode, allowing commands to be used in singleplayer.
|{{HistoryLine||1.3.1|dev=12w16a|Added cheats mode, allowing commands to be used in singleplayer.
|"Enable Cheats" could be turned on in [[Minecraft:Hardcore]] mode.}}
|"Enable Cheats" could be turned on in Hardcore mode.}}
|{{HistoryLine|||dev=12w17a|Added {{cmd|help}} and its alias {{cmd|?}}.
|{{HistoryLine|||dev=12w17a|Added {{cmd|help}} and its alias {{cmd|?}}.
|"Enable Cheats" can no longer be turned on in Hardcore mode.}}
|"Enable Cheats" can no longer be turned on in Hardcore mode.}}
Line 1,812: Line 1,812:
|{{HistoryLine|||dev=14w32b|Added {{cmd|entitydata}}.}}
|{{HistoryLine|||dev=14w32b|Added {{cmd|entitydata}}.}}
|{{HistoryLine||1.9.3|dev=pre2|Added {{Command|stopsound}}.}}
|{{HistoryLine||1.9.3|dev=pre2|Added {{Command|stopsound}}.}}
|{{HistoryLine||1.11|dev=16w32a|Added [[Minecraft:block state]] support to commands.}}
|{{HistoryLine||1.11|dev=16w32a|Added block state support to commands.}}
|{{HistoryLine|||dev=16w39a|Added {{Command|locate}}.}}
|{{HistoryLine|||dev=16w39a|Added {{Command|locate}}.}}
|{{HistoryLine||1.12|dev=17w13a|Added {{Command|advancement}} and {{Command|recipe}}.
|{{HistoryLine||1.12|dev=17w13a|Added {{Command|advancement}} and {{Command|recipe}}.
Line 1,818: Line 1,818:
|{{HistoryLine|||dev=17w18a|Added {{Command|reload}}.}}
|{{HistoryLine|||dev=17w18a|Added {{Command|reload}}.}}
|{{HistoryLine|||dev=pre1|Added {{Command|function}}.}}
|{{HistoryLine|||dev=pre1|Added {{Command|function}}.}}
|{{HistoryLine||1.13|dev=17w45a|A new library named [[Minecraft:Brigadier]] is now used to parse commands. Different components of commands are displayed in different colors, and errors are 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.
|{{HistoryLine||1.13|dev=17w45a|A new library named Brigadier is now used to parse commands. Different components of commands are displayed in different colors, and errors are 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.
|Removed {{Command|?}},{{Command|enchant}},{{Command|stats}},{{Command|testfor}},{{Command|testforblock}},{{Command|testforblocks}} and {{Command|toggledownfall}}.
|Removed {{Command|?}},{{Command|enchant}},{{Command|stats}},{{Command|testfor}},{{Command|testforblock}},{{Command|testforblocks}} and {{Command|toggledownfall}}.
|Added {{cmd|tag}} and {{cmd|team}}.
|Added {{cmd|tag}} and {{cmd|team}}.
Line 1,842: Line 1,842:
|{{HistoryLine||1.13.1|dev=18w31a|Added {{cmd|chunk|link=/forceload}}.}}
|{{HistoryLine||1.13.1|dev=18w31a|Added {{cmd|chunk|link=/forceload}}.}}
|{{HistoryLine|||dev=pre1|Renamed {{cmd|chunk|link=none}} to {{cmd|forceload}}.}}
|{{HistoryLine|||dev=pre1|Renamed {{cmd|chunk|link=none}} to {{cmd|forceload}}.}}
|{{HistoryLine||September 26, 2018|link={{tweet|dinner|1044870699465216001}}|[[Minecraft:Brigadier]] [https://github.com/Mojang/brigadier open-sourced] under the MIT license. (Source code previously was available on the library site, with no license specified).}}
|{{HistoryLine||September 26, 2018|link={{tweet|dinner|1044870699465216001}}|Brigadier [https://github.com/Mojang/brigadier open-sourced] under the MIT license. (Source code previously was available on the library site, with no license specified).}}
|{{HistoryLine||1.14|dev=18w43a|Added {{Command|drop|link=/loot}} and {{Command|schedule}}.}}
|{{HistoryLine||1.14|dev=18w43a|Added {{Command|drop|link=/loot}} and {{Command|schedule}}.}}
|{{HistoryLine|||dev=18w45a|Renamed {{Command|drop|link=none}} to {{Command|loot}}. }}
|{{HistoryLine|||dev=18w45a|Renamed {{Command|drop|link=none}} to {{Command|loot}}. }}
Line 1,864: Line 1,864:
|{{HistoryLine||1.20|dev=23w16a|Added {{cmd|return}}.}}
|{{HistoryLine||1.20|dev=23w16a|Added {{cmd|return}}.}}
|{{HistoryLine||1.20.2|dev=23w31a|The last 50 commands sent in chat is now remembered across game sessions, and can be accessed via up and down arrow keys.
|{{HistoryLine||1.20.2|dev=23w31a|The last 50 commands sent in chat is now remembered across game sessions, and can be accessed via up and down arrow keys.
|Recent commands are now stored in {{cd|command_history.txt}} in the {{code|[[Minecraft:.minecraft]]}} folder.
|Recent commands are now stored in {{cd|command_history.txt}} in the {{code|.minecraft}} folder.
|Added {{cmd|random}}.}}
|Added {{cmd|random}}.}}
|{{HistoryLine||1.20.3|dev=23w43a|Added {{cmd|tick}}.}}
|{{HistoryLine||1.20.3|dev=23w43a|Added {{cmd|tick}}.}}
Line 1,874: Line 1,874:
|{{HistoryLine||1.21.6|dev=25w15a|Added {{cmd|version}}.}}
|{{HistoryLine||1.21.6|dev=25w15a|Added {{cmd|version}}.}}
|{{HistoryLine||1.21.6|exp=Locator Bar|dev=25w15a|Added {{cmd|waypoint}}.}}
|{{HistoryLine||1.21.6|exp=Locator Bar|dev=25w15a|Added {{cmd|waypoint}}.}}
|{{HistoryLine||1.21.6|dev=25w18a|{{cmd|waypoint}} can now be used without using the [[Minecraft:experiment]] [[Minecraft:Locator Bar]].}}
|{{HistoryLine||1.21.6|dev=25w18a|{{cmd|waypoint}} can now be used without using the experiment Locator Bar.}}
|{{HistoryLine|||dev=25w20a|Added {{cmd|dialog}}.}}
|{{HistoryLine|||dev=25w20a|Added {{cmd|dialog}}.}}
|{{HistoryLine||1.21.9|dev=25w34a|Added {{cmd|fetchprofile}}.}}
|{{HistoryLine||1.21.9|dev=25w34a|Added {{cmd|fetchprofile}}.}}
Line 1,885: Line 1,885:
|{{HistoryLine||v0.7.4|Added support for commands, though none are implemented yet.}}
|{{HistoryLine||v0.7.4|Added support for commands, though none are implemented yet.}}
|{{HistoryLine||v0.16.0|dev=build 1|Added commands.
|{{HistoryLine||v0.16.0|dev=build 1|Added commands.
|Functionality of most commands is equivalent to [[Minecraft:Java Edition 1.10]] usage. Differences include: no support for [[#Data tags|data tags]].}}
|Functionality of most commands is equivalent to Java Edition 1.10 usage. Differences include: no support for [[#Data tags|data tags]].}}
|{{HistoryLine|pocket}}
|{{HistoryLine|pocket}}
|{{HistoryLine||1.0.0|dev=alpha 0.17.0.1|Added {{cmd|locate}}, {{cmd|connect}}, and {{cmd|fly}}.}}
|{{HistoryLine||1.0.0|dev=alpha 0.17.0.1|Added {{cmd|locate}}, {{cmd|connect}}, and {{cmd|fly}}.}}
Line 1,941: Line 1,941:
|{{HistoryLine||1.19.10|dev=Preview 1.19.10.23|{{cmd|locate}} can now find biomes.}}
|{{HistoryLine||1.19.10|dev=Preview 1.19.10.23|{{cmd|locate}} can now find biomes.}}
|{{HistoryLine||1.19.60|dev=Preview 1.19.60.22|Added {{cmd|scriptevent}}.}}
|{{HistoryLine||1.19.60|dev=Preview 1.19.60.22|Added {{cmd|scriptevent}}.}}
|{{HistoryLine||1.19.80|dev=Preview 1.19.80.20|Added command suggestions for [[Minecraft:block states]].}}
|{{HistoryLine||1.19.80|dev=Preview 1.19.80.20|Added command suggestions for block states.}}
|{{HistoryLine||1.19.80|dev=Preview 1.19.80.21|Added {{cmd|inputpermission}}.}}
|{{HistoryLine||1.19.80|dev=Preview 1.19.80.21|Added {{cmd|inputpermission}}.}}
|{{HistoryLine||1.20.0|dev=Preview 1.20.0.22|Added {{cmd|camera}}.}}
|{{HistoryLine||1.20.0|dev=Preview 1.20.0.22|Added {{cmd|camera}}.}}
Line 1,950: Line 1,950:
|{{HistoryLine||1.21.20|dev=Preview 1.21.10.22|Removed {{cmd|volumearea}}.}}
|{{HistoryLine||1.21.20|dev=Preview 1.21.10.22|Removed {{cmd|volumearea}}.}}
|{{HistoryLine||1.21.50|dev=Preview 1.21.50.20|Added {{cmd|set_movement_authority}}.}}
|{{HistoryLine||1.21.50|dev=Preview 1.21.50.20|Added {{cmd|set_movement_authority}}.}}
|{{HistoryLine||1.21.50|exp=Aim Assist and Data-Driven Jigsaw Structures|dev=Preview 1.21.50.25|Added {{cmd|aimassist}} behind the "Aim Assist" [[Minecraft:experimental]] toggle.}}
|{{HistoryLine||1.21.50|exp=Aim Assist and Data-Driven Jigsaw Structures|dev=Preview 1.21.50.25|Added {{cmd|aimassist}} behind the "Aim Assist" experimental toggle.}}
|{{HistoryLine|||dev=Preview 1.21.50.26|Added {{cmd|place}} behind the "Data-Driven Jigsaw Structures" [[Minecraft:experimental]] toggle.}}
|{{HistoryLine|||dev=Preview 1.21.50.26|Added {{cmd|place}} behind the "Data-Driven Jigsaw Structures" experimental toggle.}}
|{{HistoryLine||26.0|dev=Preview 26.0.23|Added command macros.}}
|{{HistoryLine||26.0|dev=Preview 26.0.23|Added command macros.}}
}}
}}
Line 1,968: Line 1,968:
*[[Minecraft:Argument types]]
*[[Minecraft:Argument types]]
*[[Minecraft:Coordinates]]
*[[Minecraft:Coordinates]]
*[[Minecraft:Entity format]]
*Entity format
*[[Minecraft:Formatting codes]]
*Formatting codes
*[[Minecraft:Text component format]]
*[[Minecraft:Text component format]]
*[[Minecraft:Target selectors]]
*[[Minecraft:Target selectors]]
Line 1,990: Line 1,990:
[[Category:Server]]
[[Category:Server]]


[[Minecraft:de:Befehl]]
de:Befehl
[[Minecraft:es:Comandos]]
es:Comandos
[[Minecraft:fr:Commandes]]
fr:Commandes
[[Minecraft:hu:Szerverparancsok]]
hu:Szerverparancsok
[[Minecraft:it:Comandi]]
it:Comandi
[[Minecraft:ja:コマンド]]
ja:コマンド
[[Minecraft:ko:명령어]]
ko:명령어
[[Minecraft:lzh:令]]
lzh:令
[[Minecraft:nl:Opdrachten]]
nl:Opdrachten
[[Minecraft:pl:Polecenia]]
pl:Polecenia
[[Minecraft:pt:Comandos]]
pt:Comandos
[[Minecraft:ru:Команды консоли]]
ru:Команды консоли
[[Minecraft:th:คำสั่ง]]
th:คำสั่ง
[[Minecraft:tr:Komutlar]]
tr:Komutlar
[[Minecraft:uk:Команди консолі]]
uk:Команди консолі
[[Minecraft:zh:命令]]
zh:命令

Revision as of 15:43, 9 April 2026

Template:For Template:Redirect Template:Redirect

File:Introduction-to-commands.jpg
Showcase of using Template:Command to change the time in Minecraft

Commands (also known as console commands or slash commands) are an advanced game mechanic that execute specific actions when entered as text or triggered by blocks or certain entities.

Usage

File:Command Block UI 1.21.5.png
The interface of a command block in Template:JE
File:Command Block UI BE.png
The interface of a command block in Template:BE

In the client, commands are entered via the chat window, which is displayed by pressing the Template:Key / Template:Key / File:Chat button.pngTemplate:Only / Template:XbuttonTemplate:Only or Template:Key key. Using the Template:Key key also enters the forward-slash that commands require as a prefix, so it is a useful shortcut. The Template:Key / Template:Xbutton and Template:Key / Template:Xbutton keys can be used to view previously entered text, including all previously executed commands.

When the cursor is at a location corresponding to some types of argument (such as an entity ID), a list of applicable values appears above the text box. If the argument already contains characters, the list displays only those values containing the typed text. Pressing Template:Key while entering commands cycles through possible commands or arguments, and can be used to auto-enter them.

Commands may also be entered in a multiplayer Minecraft:server's console but are not preceded by a Template:Key when entered this way. A server owner running commands in this way is often referred to as "ghosting".

Commands in command blocks can be preceded by a slash, but it is not required.

Commands can be executed in the following ways:

File:Command macro toast.png
The toast that appears when a command macro fails

Template:IN, commands can be executed through specified hotkeys on keyboard & mouse controls, known as command macros. The keybinds with commands can be customized below all other keybinds in the settings. For up to 10 macros, a command can be entered in a text input, which can be quickly executed in-game by pressing Template:Keys. Command macros can be preceded by a slash, but it is not required. This feature is not to be confused with Java Edition's function macros, where functions may reference additional parameters and use them in macro lines (see Template:Slink).

Commands guide

Syntax

Template:IN:

Entry Meaning
Template:Code Enter this literally, exactly as shown.
Template:Code An argument, which should be replaced with an appropriate value. Note: the angle brackets should be replaced too; they only indicate the purpose of the text.
Decorator Meaning
Template:Code This entry is optional.
Template:Code
Template:Code
etc.
Required. Pick one of these entries.
Template:Code
Template:Code
etc.
Optional. Pick one of these entries.
Template:Code In the game, another full command is required.
In this wiki, some required parts are left out.
For example: Template:Code is an optional argument. Template:Code is an optional plain text.
For example: Template:Code, where Template:Code and Template:Code are plain texts that should be entered literally; Template:Code means we should pick one plain text from Template:Code and Template:Code; Template:Code and Template:Code are required arguments, which should be replaced with appropriate values; Template:Code is an optional argument.

Template:IN:

Entry Meaning
Template:Code Enter this literally, exactly as shown.
Template:Code An argument, which should be replaced with an appropriate value.
Template:Code Another full command is required.
Template:Code
Template:Code
etc.
Enter one of these texts literally.
Decorator Meaning
Template:Code This entry is required.
Template:Code This entry is optional.
Template:Code In this wiki, some required parts are left out.
The angle bracket decorator (Template:Code) is usually not used on a Template:Code. A required plain text does not need any decorator.
For example, both Template:Code and Template:Code represent a required plain text, but the latter one is usually not used. Template:Code is a required argument.

In both Template:El and Template:El, square bracket decorator (Template:Code) mean that an entry is optional. Entries decorated with square brackets can only be at the end of a command. Multiple entries decorated with square brackets are allowed at the end of a command, for example, Template:Code at the end of a command indicates that only Template:Code, Template:Code, and Template:Code are valid.

Restrictions

Most commands require the executor to have a high enough Minecraft:permission level. That means most commands are only available in the singleplayer world if cheats are enabled, and are only available in multiplayer servers if the player is an operator. See Minecraft:permission level for details.

Some commands have restrictions on who can use the command or in what context.

  • None: The command has no restriction.
  • Cheats only: Applicable only to Template:El. When executed by the server, or a script, the command is available no matter whether cheats are enabled. (Commands from the console, a scheduled function or a ticking function are executed by the server.) When executed in other ways, the command is available only if cheats are enabled. When cheats are disabled, these commands can't be used unless executed by a server or a script, even if the executor has a high Minecraft:permission level.
    • Template:IN, whether cheats are enabled only affects the permission level of a player. If an executor has a high enough permission level, it can use corresponding commands regardless of whether cheats are allowed.
  • Dedicated server only: The command is available only on dedicated servers.
  • No dedicated server: The command is not available on dedicated servers.

Cheats

Cheats can be enabled when creating a new world by Allow CommandsTemplate:Only / CheatsTemplate:Only options.

Template:IN, the "Allow Commands" option when creating a new world only affects the player in a singleplayer world or the owner of a LAN world. The "Allow Commands" option when opening a LAN world affects all players in the LAN world.

Template:IN, in singleplayer worlds where cheats were not enabled at creation, they can be enabled on a temporary basis by opening the current game session to LAN play ( Template:Key → "Open to LAN", then "Allow Cheats" button and "Start LAN World"). The player does not actually need to be on a LAN or have others join. This is not permanent but allows the use of commands until the player quits the world, and changes the player makes via commands (items spawned, etc.) are saved with the world. The player can do this each time the player starts playing the world again. Note that this disables game pausing for the duration, so while open to LAN, the player should get somewhere safe or reload their world before using the Game Menu. The player can disable the LAN world by reloading the world. To permanently enable cheats, the level.dat file has to be edited.

Template:IN, cheats can be toggled at any time in the "Cheats" tab of the settings menu. Enabling cheats in a world permanently prevents players from unlocking Minecraft:achievements in that world, even if cheats are later turned off. In Minecraft:Bedrock Dedicated Server, Template:Cmd command can be used to toggle cheats.

Argument types

Template:Main There are different argument types for arguments in commands. Minecraft:Coordinates, target selector, SNBT, text component, and so on are commonly used formats in arguments.

Parsing and execution

Template:See also

The command performing on the server side is divided into two stages: command parsing and command execution. During the command parsing stage, the game identifies the string as a command and checks whether the command is complete and whether arguments are specified correctly. During the command execution stage, the command fulfills its purpose.

When typing a command in the chat, or command block, the command is also be parsed in the client side first to provide autocompletion and help the player detect typing mistakes.

When typing an argument into the chat, it's noticeable if an argument cannot be parsed in the client side. However, being able to be parsed in the client side does not guarantee that this argument can be parsed in the server side.
Template:IN, if an argument can't be parsed by the client, the argument is marked in red, and a syntax error message is displayed above the chat bar.
Template:IN, when typing in the chat, if an argument can be parsed in the client side, the next argument in syntax hint turns to white from gray. If all arguments (including optional arguments) are entered and parseable in the client side, the whole syntax hint turns to gray from white.
Template:IN, typing a command in command block also behaves as above
Template:IN, when typing a command in command block, autocompletion is provided without syntax hint.

Template:IN, when entering into a command block, the command is parsed on the server side once the command block screen is closed. If the command is unparseable in the server side, a syntax error message is outputted into its output box.

When attempting to execute an unparseable command, an error message is displayed.

Template:IN, the message has a <--[HERE] at its end.
Template:IN, the message is Unknown command or Syntax error: unexpected ... at ....

Commands in functions are all parsed when loading the function. If any command in a function file is unparseable, the function cannot be loaded by the game. Template:IN, macro lines are parsed when attempting to run the function, see also Template:Slink and Template:Slink.

Template:IN, if a command in a script is unparseable, an error is thrown when trying to execute the command.

Output

After trying to execute a command, it may yield output values, including success count and stored valuesTemplate:Only.

Success count is the value a command passes to the command block executing it. A command block can power a redstone comparator facing away from it (may be separated by a block) with signal strength being the success count. The signal strength reflects the success count of the last command executed. Even after the command block is deactivated, the success count is retained until the command is executed again. Template:IN, the success count is also returned to the script executing the command. Template:IN, commands that cannot be executed in command blocks have no success count. Template:IN, commands that cannot be executed in command blocks or scripts still have a success count, but it cannot be obtained. Template:IN, success count is always 0 or 1, except the Template:Cmd command. Template:IN, success count is an integer between 0 to 2,147,483,647 (both inclusive) related to the command (e.g., the number of players affected by the command, the number of blocks that were altered, etc.)

Stored valuesTemplate:Only include Template:Cd value and Template:Cd value, which are the values passed by other commands to the Template:Cmd command, when a command is executed by a Template:Cmd command. These two values can be stored to a specified location by the Template:Cd subcommand in the Template:Cmd command. The Template:Cd value is always 0 or 1. The Template:Cd value is an integer (rounded down if not). All commands may yield these two stored values after execution, with only two exceptions: Template:Cmd command itself does not yield these two stored values; Template:Cmd command may not yield these two stored values in certain situation.

Result

After trying to execute a command, it has a certain result. Possible results include "Unparseable", "Failed", "Successful", "Void"Template:Only, "Terminated"Template:Only, and "Error"Template:Only.

Unparseable
If the entered command is unable to be parsed in the server side, it is unparseable.
ErrorTemplate:Only
If an error occurs with a command, it means that there's a noticeable bug on the command. It may result in unintended side effects, and it jumps out the Template:Cmd command halfway through, causing some branches to not be executed.
Technically, it means that an exception other than brigadier.exceptions.CommandSyntaxException is thrown during execution.
VoidTemplate:Only
Exclusive to Template:Cmd command. If it is void, the command has no Template:Code or Template:Code value to be stored by Template:Cmd.
TerminatedTemplate:Only
Exclusive to Template:Cmd command. When running a Template:Cmd command, if the number of execution branches becomes 0, the command terminates, ending before the last sub-command is executed.
For example: Template:Cmd in a command block. The command block is not an entity, so it cannot be selected by a target selector. As a result, the command is terminated at Template:Cd.
Failed and Successful
If a command is not unparseable, erroring, void, nor terminated, it may be failed or successful.
If the success count is 0, the command is failed. Otherwise, the command is successful.
Template:IN, commands that cannot be executed in command blocks have no success count. It is failed when Template:Cmd stores 0, and successful when Template:Cmd stores 1.
Template:IN, if the command cannot be executed in command blocks or scripts, it still has a success count, but it cannot be obtained.
Note that when we say that a command is failed or successful, it must not be unparseable, error, void, or terminated. Though when being unparseable, error, void or terminated, the success count is 0, it is not considered as being failed nor successful.
Note that not all "successful" commands actually do something, and not all "failed" commands fail to do something useful.

List of commands

The tables below will summarize all commands.

Available in Java Edition

Command Description Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip
Template:Cmd Gives, removes, or checks player advancements. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Queries, adds, removes or sets an entity attribute. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Adds player to banlist. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Adds IP address to banlist. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Displays banlist. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Creates and modifies bossbars. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Clears items from player inventory. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Copies blocks from one place to another. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Applies damage to the specified entities. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gets, merges, modifies, and removes Minecraft:block entity, entity, and command storage NBT data. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Controls loaded data packs. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Starts or stops a debugging session. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the default game mode. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Revokes operator status from a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Shows dialog to clients. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the difficulty level. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Adds or removes status effects. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Adds an enchantment to a player's selected item. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Executes another command. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Adds or removes player experience. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Fetches a player profile. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Fills a region with a specific block. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Fills a region with a specific biome. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Forces chunks to constantly be loaded or not. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Runs a function. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets a player's game mode. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets or queries a game rule value. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gives an item to a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Provides help for commands. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Manipulates items in inventories. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Starts or stops a JFR profiling. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Kicks a player off a server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Kills entities (players, mobs, items, etc.). Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Lists players on the server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Locates closest structure, biome, or point of interest. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Drops items from an inventory slot onto the ground. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Displays a message about the sender. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd and Template:Cmd. Displays a private message to other players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Grants operator status to a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Removes player from the banlist. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Removes IP address from the banlist. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Creates particles. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Captures info and metrics about the game for 10 seconds. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used to place a configured feature, jigsaw, template, or structure at a given location. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Plays a sound. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Opens single-player world to local network. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Draw a random value or control the random number sequence. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gives or takes player recipes. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Reloads loot tables, advancements, and functions from disk. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Control execution flow inside functions and change their return value. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used to make entities ride other entities, or stop entities from riding. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Changes the rotation of an entity. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Saves the server to disk. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Disables automatic server saves. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Enables automatic server saves. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Displays a message to multiple players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Delays the execution of a function. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Manages scoreboard objectives and players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Displays the Minecraft:world seed. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Changes a block to another block. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the time before idle players are kicked. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the Minecraft:world spawn. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the spawn point for a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Make one player in spectator mode spectate an entity. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Teleports entities to random locations. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Stops a server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Stops a sound. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Summons an entity. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Swings the hands of an entity. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Controls entity tags. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Controls teams. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Specifies the message to send to team. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Teleports entities. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd and Template:Cmd. Displays a private message to other players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Displays a JSON message to players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Manage and execute GameTests. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Controls the tick rate of the game. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Changes or queries the world's game time. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Manages screen titles. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Specifies the message to send to team. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Teleports entities. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Triggers a transfer of a player to another server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets a trigger to be activated. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Presents the server's game version. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd and Template:Cmd. Displays a private message to other players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Manages waypoints displayed on the locator bar. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the weather. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Manages server whitelist. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Manages the world border. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Adds or removes player experience. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc

Debugging commands

Template:Debug warning

Debugging commands are not accessible by default, but can be enabled using debug properties.

Command Description Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Required debug property
Template:Cmd Shows how many warnings a sculk shrieker has before spawning a Minecraft:warden. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Nbt DEV_COMMANDS
Template:Cmd Shows the calculated path for entities. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Displays mob spawning information. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Starts a raid Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Configures a server resource pack. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Spawns all possible combinations of designs, materials, and armor types of armor trims. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Configuration options for debugging. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sync the movement of two or more clients. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Nbt CHASE_COMMAND

Available in Bedrock Edition and Minecraft Education

Command Description Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip
Template:Cmd An alias of Template:Cmd. Provides help for commands. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Grants or revokes a player ability. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Manages server allowlist. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Modifies player's aim assist. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Locks and unlocks the day-night cycle. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Switch to custom camera perspectives and fade the screen. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used to enable a camera shaking effect. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Changes a setting on the dedicated server while it's running. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Clears items from player inventory. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Removes the spawn point for a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Copies blocks from one place to another. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Attempts to connect to the websocket server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Switching control schemes when the Experimental Creator Camera toggle is enabled. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Applies damage to the specified entities. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Locks and unlocks the day-night cycle. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Attempts to connect to a websocket server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Revokes operator status from a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Opens NPC dialogue for a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the difficulty level. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Adds or removes status effects. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Adds an enchantment to a player's selected item. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used to trigger an event on an entity. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Executes another command. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Fills a region with a specific block. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used for managing active fog settings for players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Runs a function. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets a player's game mode. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets or queries a game rule value. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd To test the GameTest features. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Enable or disable the game tips on this device. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gives an item to a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Provides help for commands. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Changes the visibility of a HUD element. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Allows setting immutable state of a world. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Specify the operation for the player's permission status. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Kicks a player off a server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Kills entities (players, mobs, items, etc.). Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Lists players on the server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Locates closest structure or biome. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Drops items from an inventory slot onto the ground. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Displays a message about the sender. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Enables/disables a specified mob event. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd and Template:Cmd. Displays a private message to other players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Allows the player to control playing music tracks. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Grants operator status to a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Reloads and applies permissions. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Creates particles. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Reloads and applies permissions. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used to place a configured feature, jigsaw, template, or structure at a given location. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used to run a one-off animation. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Plays a sound. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Contains tools for managing Editor projects. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gives or takes player recipes. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Reloads loot tables, advancements, and functions from disk. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Reloads configuration files relating to variables, permissions, etc. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Reloads packetlimitconfig.json configuration file. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Removing agent. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Replaces items in inventories. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used to make entities ride other entities, stop entities from riding, make rides evict their riders, or summon rides or riders. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Prepares a backup, queries its status, or resumes. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Displays a message to multiple players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Delays the execution of a function. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Manages scoreboard objectives and players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Debugging options for GameTest Framework. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Triggers a script event with an ID and message. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Send a request to show players the store offer. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Control the client or server to check a player movement. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Changes a block to another block. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the maximum number of players allowed to join. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the Minecraft:world spawn. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the spawn point for a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Teleports entities to random locations. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Stops a server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Stops a sound. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used to save and load structures without having to use structure blocks items in inventories. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Summons an entity. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Controls entity tags. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Teleports entities. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd and Template:Cmd. Displays a private message to other players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Displays a JSON message to players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Counts entities matching specified conditions. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Tests whether a block is in a location. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Tests whether the blocks in two regions match. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Add, remove, or list ticking areas. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Changes or queries the world's game time. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Manages screen titles. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Controls screen titles with JSON messages. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Toggles the weather. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Teleports entities. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Triggers a transfer of a player to another server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd and Template:Cmd. Displays a private message to other players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Ability to edit restricted blocks. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets the weather. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Manages server allowlist. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Ability to edit restricted blocks. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd An alias of Template:Cmd. Attempts to connect to the websocket server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Adds or removes player experience. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc

Hidden commands

Template:Exclusive These commands are unavailable in general cases. Most of them can be accessed with a Websocket Server, NPC, the Scripting API or cheatsTemplate:Only. Note: You can easily check if a command is still in the game by typing Template:Cmd into a server console, or the ingame chat. If you do so, and it says Syntax error, then the command does not exist. If it either gives help on the command or says unknown command, then it is still in the game - for example, the command Template:Cmd will return Template:Code, while the command Template:Cmd will return Template:Code.

Command Description Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip
Template:Cmd Controls the agent. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets Code Builder state for a player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd<ref>bedrock samples for 1.20.80.5 release metadata/command_modules/mojang-commands.json line 15868</ref> UnknownTemplate:Info needed Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd<ref>bedrock samples for 1.20.80.5 release metadata/command_modules/mojang-commands.json line 15874</ref> UnknownTemplate:Info needed Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Ability to edit restricted blocks. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Closes the chat window of the local player if it is open. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Closes websocket connection if there is one. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Launches Code Builder. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Enable encryption for the current websocket connection. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gets pixels for a specific chunk. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gets list of chunks that are loaded. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Shows the information about the client. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Shows the information about the server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Shows the name of the local player. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gets the spawn position of the specified player(s). Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gets the position of the top non-air block below the specified position. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Sets or gets the paused state of the game for all players. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Handle Educational Lesson reporting. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Lists the information about players on the server. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Gets transform, name, and id information about the given target entity or entities. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd<ref>bedrock samples for 1.20.80.5 release metadata/command_modules/mojang-commands.json line 15886</ref> Send a request to show players the store offer.Template:Info needed Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Spawns an item entity at position. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Takes a photo of a player or from a player's point of view. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc

Removed commands

Removed from Java Edition

Command Description Version removed Reason for deletion Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip
Template:Cmd An alias of Template:Cmd. Provides help for commands. Template:Nowrap
(17w45a)
? Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc

Template:Cmd

Gives or takes an achievement from a player Template:Nowrap
(17w13a)
Achievements were superseded by advancements Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Bans a player by IP number Template:Nowrap Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Modifies the data tag of a block Template:Nowrap
(17w47a)
Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Broadcasts a message across the entire server Java Edition Classic 0.0.16a_01 Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Force chunks to load constantly or not Template:Nowrap
(pre1)
Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Modifies the data tag of an entity Template:Nowrap
(17w45b)
Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Teleports player to the Minecraft:world spawn Template:Nowrap Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Locates biomes Template:Nowrap Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Used to place a configured feature at a given location Template:Nowrap Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Replaces items in inventories Template:Nowrap
(20w46a)
Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Sets the current location as the default spawn location for new players Template:Nowrap Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Toggles between placing stone or bedrock Template:Nowrap Minecraft:Bedrock was added to the Creative inventory as a separate item Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Update objectives from command results Template:Nowrap
(17w45a)
Merged with Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Counts entities matching specified conditions. Template:Nowrap
(17w45a)
Merged with Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Tests whether a block is in a location. Template:Nowrap
(17w45a)
Merged with Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Tests whether the blocks in two regions match. Template:Nowrap
(17w45a)
Merged with Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Toggles the weather Template:Nowrap
(17w45a)
Redundancy with Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Pardons a banned player Template:Nowrap Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc

Removed from Bedrock Edition or Minecraft Education

Command Description Version removed Reason for deletion Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip Template:Tooltip
Template:Nowrap Clears fixed inventory slots Template:Nowrap
(build 2)
? Template:Tc Template:Tc Template:Tc ? Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Execute a command when condition is met Template:Nowrap Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Execute a command ? Superseded by /execute Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Mixer interactivity control Template:Nowrap Mixer was discontinued Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Toggles player coordinates to be displayed on the HUD Template:Nowrap Superseded by Template:Cmd Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Update the Minecraft:villagers' supply for economic trade ? ? Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Sets fixed inventory slot with a specific item Minecraft:Pocket Edition v0.16.0 alpha
(build 2)
? Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Nowrap Sets the amount of fixed inventory slots Minecraft:Pocket Edition v0.16.0 alpha
(build 2)
? Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Transfer player to a server Template:Nowrap ? Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Attempts to connect to the websocket server to send a video stream ? Superseded by Template:Cmd. Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Attempts to run a action on video stream ? ? Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc
Template:Cmd Add, remove, or list volume areas Template:Nowrap ? Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc Template:Tc

Developer commands

Template:Main Template:Exclusive Developer commands are only enabled in internal development builds of Bedrock Edition, and are not normally accessible in release versions.

Agent commands

Template:Exclusive Superseded by Template:Cmd

Joke commands

Template:Exclusive These commands only exist in April Fools' Day joke versions of the game.

History

Template:See also Template:Info needed section

Command additions and changes

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

April Fools commands

Template:HistoryTable

Issues

Template:Issue list

See also

References

Template:Reflist

External links

Navigation

Template:Navbox commands Template:Navbox Java Edition technical Template:Navbox Bedrock Edition Template:Mojang featured

de:Befehl es:Comandos fr:Commandes hu:Szerverparancsok it:Comandi ja:コマンド ko:명령어 lzh:令 nl:Opdrachten pl:Polecenia pt:Comandos ru:Команды консоли th:คำสั่ง tr:Komutlar uk:Команди консолі zh:命令