Commands, also known as console commands and slash commands, are advanced features activated by typing certain strings of text.
Usage[]
In the client, commands are entered via the chat window, which is displayed by pressing the T / [BE only] / [BE only] or / key. Using the / key also enters the forward-slash that commands require as a prefix, so it is a useful shortcut. The ↑ and ↓ 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 ID), a list of applicable values appears above the text box. If the argument is already containing some characters, the list displays only those values containing the typed command/text. Pressing Tab ↹ 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 server's console, but are not preceded by a / 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;
- Entered by a player in the chat window.
- Executed by a command block or Minecart with command block.
- In functions, as part of a data pack[Java Edition only] or behavior pack[Bedrock Edition only].
- In a multiplayer server, entered in the console.
- Click a Json text that has "run_command" action.[Java Edition only]
- Executed with a WebSocket server.[Bedrock Edition only]
- Executed by an NPC.[Bedrock Edition only]
Most commands require the executor have a high enough permission level. That means most commands are available in the singleplayer world only if cheats are enabled, and available in multiplayer server only if the player is an operator. See permission level for details.
Enabling cheats in existing worlds[]
In Java Edition, 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 ( 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 Edition, cheats can be toggled at any time in the "Game" tab of the settings menu. Enabling cheats in a world permanently prevents players from unlocking achievements in that world, even if cheats are later turned off.
Command guide[]
Syntax[]
In Java Edition:
Syntax Meaning plain text
Enter this literally, exactly as shown. <argumentsName>
An argument that should be replaced with an appropriate value. [entry]
This entry is optional. (entry|entry)
(Required) Pick one of the entries that is shown. [entry|entry]
(Optional) Pick one of the entries that is shown. ellipsis ...
Another sub-command is required.
In Bedrock Edition:
Syntax Meaning plain text
Enter this literally, exactly as shown. name: type
An argument that should be replaced with an appropriate value. entry|entry
Pick one of the entries that is shown. <entry>
This entry is required. [entry]
This entry is optional. ellipsis ...
Another sub-command is required.
Restrictions[]
- Some commands have restrictions on who can use the command or in what context.
- None: The command has no restriction.
- Cheat only:[Bedrock Edition only] When executed by a player, the command is available only if cheats is enabled.
- In Bedrock Edition, when cheats is disabled, these commands can't be used by players even if they have a high permission level. In Java Edition, if players have a high enough permission level, they can use corresponding commands regardless of whether cheats are allowed.
- Dedicated server only: The command is available only on a dedicated server.
- Creative Only:[Bedrock Edition only] When executed by a player, the command is available only if player is in Creative.
Result[]
After trying to run the command comes different results, including "unparseable", "failed", "successful", "error",[Java Edition only] and "Terminate".[Java Edition only]
- Unparseable
- If the entered command is incomplete or the arguments do not meet required argument types, the command is unparseable.
- When typing a argument into the chat bar, it's noticeable if an argument does not meet the required argument type in Java Edition.
- In Java Edition, if not meet, the argument is marked red and an syntax error message is displayed.
- In Bedrock Edition, when typing in chat bar, if an argument can be identified by client, the next argument in grammar hints turns white from gray. If all arguments (including optional arguments) are entered, the whole grammar hint turns gray from white. However, being able to be identified by client doesn't guarantee that this argument meet required argument type.
- In Java Edition, it behaves the same as typing in the chat bar when typing in a command block.
- In Bedrock Edition, when entering into a command block, if the command is unparseable, an syntax error message is outputted into its output box after closing the command block screen.
- When trying to execute an unparsable command, an error message is displayed.
- In Java Edition, it is "Unknown or incomplete command" or "Incorrect argument for command".
- In Bedrock Edition, it is "Unknown command" or "Syntax error: unexpected ... at ...".
- If a command in a function file is unparseable, the function is unable to loaded in game.
- Failed and successful
- A command's Success Conditions must be met in order for the game to consider the command "successful". This is used to determine a variety of things, such as the output of a redstone comparator feeding from a command block with a command. Note that not all "successful" commands actually do something, and not all "failed" commands fail to do something useful.
- Error[Java Edition only]
- If an error occurs with the command, it means that there's a noticeable bug on this command.
- Terminate[Java Edition only]
- When running a
/execute
command, if the subcommands specifies 0 execution context, the command does nothing and doesn't output anything. - For example:
/execute as @s run ...
in a command block.
List and summary of commands[]
The table below summarizes all commands.
Command | Description | BE | EE | JE | JE OP level | BE&EE OP level | Multiplayer[JE only]/Server[BE & edu only] only | ||||
---|---|---|---|---|---|---|---|---|---|---|---|
/?
|
An alias of /help . Provides help for commands.
|
Yes | Yes | Removed | 0 | 0 | — | — | — | — | — |
/ability
|
Grants or revokes a player ability. | Yes | Yes | — | — | 1 | — | — | — | — | |
/advancement
|
Gives, removes, or checks player advancements. | — | — | Yes | 2 | — | — | — | — | — | |
/alwaysday
|
An alias of /daylock . Locks and unlocks the day-night cycle.
|
Yes | Yes | — | — | 1 | — | — | — | — | |
/attribute
|
Queries, adds, removes or sets an entity attribute. | — | — | Yes | 2 | — | — | — | — | ||
/ban
|
Adds player to banlist. | — | — | Yes | 3 | — | Yes | — | — | — | |
/ban-ip
|
Adds IP address to banlist. | — | — | Yes | 3 | — | Yes | — | — | — | |
/banlist
|
Displays banlist. | — | — | Yes | 3 | — | Yes | — | — | — | |
/bossbar
|
Creates and modifies bossbars. | — | — | Yes | 2 | — | — | — | — | ||
/camera
|
Switch to custom camera perspectives and fade the screen. | Yes | Not Added Yet | — | — | [more information needed] | — | — | — | — | |
/camerashake
|
Used to enable a camera shaking effect. | Yes | Yes | — | — | 1 | — | — | — | — | |
/changesetting
|
Changes a setting on the dedicated server while it's running. | Yes | — | — | — | 4 | Yes | — | — | — | — |
/clear
|
Clears items from player inventory. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/clearspawnpoint
|
Remove spawnpoints in the world. | Yes | Yes | — | — | 1 | — | — | — | — | |
/clone
|
Copies blocks from one place to another. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/connect
|
An alias of /wsserver . Attempts to connect to the websocket server.
|
Yes | Yes | — | — | 0[edu only] 2[BE only] |
— | — | — | — | — |
/damage
|
Applies damage to the specified entities. | Yes | Yes | Yes | — | 1 | — | — | — | ||
/data
|
Gets, merges, modifies and removes block entity and entity NBT data. | — | — | Yes | 2 | — | — | — | |||
/datapack
|
Controls loaded data packs. | — | — | Yes | 2 | — | — | — | — | — | |
/daylock
|
An alias of /alwaysday . Locks and unlocks the day-night cycle.
|
Yes | Yes | — | — | 1 | — | — | — | — | |
/debug
|
Starts or stops a debugging session. | — | — | Yes | 3 | — | — | — | — | — | — |
/dedicatedwsserver
|
Attempts to connect to a websocket server. | Yes | — | — | — | 0 | Yes | — | — | — | — |
/defaultgamemode
|
Sets the default game mode. | — | — | Yes | 2 | — | — | — | — | — | |
/deop
|
Revokes operator status from a player. | Yes | Yes | Yes | 3 | 2 | Yes[Java Edition only] | — | — | — | |
/dialogue
|
Opens NPC dialogue for a player. | Yes | Yes | — | — | 1 | — | — | — | — | |
/difficulty
|
Sets the difficulty level. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/effect
|
Adds or removes status effects. | Yes | Yes | Yes | 2 | 1 | — | — | — | ||
/enchant
|
Adds an enchantment to a player's selected item. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/event
|
Used to trigger an event on an entity. | Yes | Yes | — | — | 1 | — | — | — | ||
/execute
|
Executes another command. | Yes | Yes | Yes | 2 | 1 | — | ||||
/experience
|
An alias of /xp . Adds or removes player experience.
|
— | — | Yes | 2 | — | — | — | — | — | |
/fill
|
Fills a region with a specific block. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/fillbiome
|
Fills a region with a specific biome. | — | — | Yes | 2 | — | — | — | — | — | |
/fog
|
Used for managing active fog settings for players. | Yes | Yes | — | — | 1 | — | — | — | — | |
/forceload
|
Forces chunks to constantly be loaded or not. | — | — | Yes | 2 | — | — | — | — | — | |
/function
|
Runs a function. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/gamemode
|
Sets a player's game mode. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/gamerule
|
Sets or queries a game rule value. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/gametest
|
To test the GameTest features. | Yes | Yes | — | — | 1 | — | — | — | — | — |
/give
|
Gives an item to a player. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/help
|
An alias of /? . Provides help for commands.
|
Yes | Yes | Yes | 0 | 0 | — | — | — | — | — |
/immutableworld
|
Allows setting immutable state of a world. | Yes | Yes | — | — | 1 | — | — | — | — | |
/item
|
Manipulates items in inventories. | — | — | Yes | 2 | — | — | — | |||
/jfr
|
Starts or stops a JFR profiling. | — | — | Yes | 4 | — | — | — | — | — | — |
/kick
|
Kicks a player off a server. | Yes | Yes | Yes | 3 | 1 | — | — | — | — | |
/kill
|
Kills entities (players, mobs, items, etc.). | Yes | Yes | Yes | 2 | 1 | — | — | — | ||
/list
|
Lists players on the server. | Yes | Yes | Yes | 0 | 0 | — | — | — | — | |
/locate
|
Locates closest structure, biome, or point of interest. | Yes | Yes | Yes | 2 | 1 | — | — | |||
/loot
|
Drops items from an inventory slot onto the ground. | Yes | Yes | Yes | 2 | 2 | — | — | |||
/me
|
Displays a message about the sender. | Yes | Yes | Yes | 0 | 0 | — | — | — | — | |
/mobevent
|
Enables/disables a specified mob event. | Yes | Yes | — | — | 1 | — | — | — | — | |
/msg
|
An alias of /tell and /w . Displays a private message to other players.
|
Yes | Yes | Yes | 0 | 0 | — | — | — | — | |
/music
|
Allows the player to control playing music tracks. | Yes | Yes | — | — | 1 | — | — | — | — | |
/op
|
Grants operator status to a player. | Yes | Yes | Yes | 3 | 2 | Yes[Java Edition only] | — | — | — | |
/ops
|
An alias of /permission . Reloads and applies permissions.
|
Yes | Yes | — | — | 4 | Yes | — | — | — | |
/pardon
|
Removes entries from the banlist. | — | — | Yes | 3 | — | Yes | — | — | — | |
/pardon-ip
|
Removes entries from the banlist. | — | — | Yes | 3 | — | Yes | — | — | — | |
/particle
|
Creates particles. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/perf
|
Captures info and metrics about the game for 10 seconds. | — | — | Yes | 4 | — | Yes | — | — | — | |
/permission
|
An alias of /ops . Reloads and applies permissions.
|
Yes | Yes | — | — | 4 | Yes | — | — | — | |
/place
|
Used to place a configured feature, jigsaw, template, or structure at a given location. | — | — | Yes | 2 | — | — | — | — | ||
/playanimation
|
Used to run a one-off animation. | Yes | Yes | — | — | 1 | — | — | — | ||
/playsound
|
Plays a sound. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/publish
|
Opens single-player world to local network. | — | — | Yes | 4 | — | SP only | — | — | — | |
/random
|
Draw a random value or control the random number sequence. | — | — | Yes | 0 (without sequence )2 |
— | — | — | — | — | — |
/recipe
|
Gives or takes player recipes. | Yes | — | Yes | 2 | — | — | — | — | — | |
/reload
|
Reloads loot tables, advancements, and functions from disk. | Yes | Yes | Yes | 2 | 2 | — | — | — | — | |
/remove
|
Removing agent. | — | Yes | — | — | 2 | — | — | — | — | |
/replaceitem
|
Replaces items in inventories. | Yes | Yes | Removed | 2 | 1 | — | — | |||
/return
|
Control execution flow inside functions and change their return value. | No | No | Yes | N/A | — | N/A | N/A | N/A | N/A | N/A |
/ride
|
Used to make entities ride other entities, stop entities from riding, make rides evict their riders, or summon rides or riders. | Yes | Yes | Yes | — | 1 | — | — | — | ||
/save
|
Prepares a backup, queries its status, or resumes. | Yes | — | — | — | 4 | Yes | — | — | — | |
/save-all
|
Saves the server to disk. | — | — | Yes | 4 | — | Yes | — | — | — | |
/save-off
|
Disables automatic server saves. | — | — | Yes | 4 | — | Yes | — | — | — | |
/save-on
|
Enables automatic server saves. | — | — | Yes | 4 | — | Yes | — | — | — | |
/say
|
Displays a message to multiple players. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/schedule
|
Delays the execution of a function. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | — |
/scoreboard
|
Manages scoreboard objectives and players. | Yes | Yes | Yes | 2 | 1 | — | — | — | ||
/script
|
[more information needed]. | Yes | Yes | — | — | ? | — | — | — | — | — |
/scriptevent
|
[more information needed]. | Yes | — | — | — | ? | — | — | — | — | — |
/seed
|
Displays the world seed. | — | — | Yes | 0 in singleplayer 2 in multiplayer |
— | — | — | — | — | |
/setblock
|
Changes a block to another block. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/setidletimeout
|
Sets the time before idle players are kicked. | — | — | Yes | 3 | — | Yes | — | — | — | |
/setmaxplayers
|
Sets the maximum number of players allowed to join. | Yes | Yes | — | — | 3 | — | — | — | — | |
/setworldspawn
|
Sets the world spawn. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/spawnpoint
|
Sets the spawn point for a player. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/spectate
|
Make one player in spectator mode spectate an entity. | — | — | Yes | 2 | — | — | — | — | — | |
/spreadplayers
|
Teleports entities to random locations. | Yes | Yes | Yes | 2 | 1 | — | — | — | ||
/stop
|
Stops a server. | Yes | — | Yes | 4 | 4 | Yes | — | — | — | |
/stopsound
|
Stops a sound. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/structure
|
Used to save and load structures without having to use structure blocks items in inventories. | Yes | Yes | — | — | 1 | — | — | |||
/summon
|
Summons an entity. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/tag
|
Controls entity tags. | Yes | Yes | Yes | 2 | 1 | — | — | — | ||
/team
|
Controls teams. | — | — | Yes | 2 | — | — | — | — | ||
/teammsg
|
An alias of /tm . Specifies the message to send to team.
|
— | — | Yes | 0 | — | — | — | — | — | |
/teleport
|
An alias of /tp . Teleports entities.
|
Yes | Yes | Yes | 2 | 1 | — | — | — | ||
/tell
|
An alias of /msg and /w . Displays a private message to other players.
|
Yes | Yes | Yes | 0 | 0 | — | — | — | — | |
/tellraw
|
Displays a JSON message to players. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/testfor
|
Counts entities matching specified conditions. | Yes | Yes | Removed | 2 | 1 | — | — | — | ||
/testforblock
|
Tests whether a block is in a location. | Yes | Yes | Removed | 2 | 1 | — | — | — | — | |
/testforblocks
|
Tests whether the blocks in two regions match. | Yes | Yes | Removed | 2 | 1 | — | — | — | — | |
/tickingarea
|
Add, remove, or list ticking areas. | Yes | Yes | — | — | 1 | — | — | — | — | |
/time
|
Changes or queries the world's game time. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/tick
|
Freezes and unfreezes time, manages how fast time goes. | N/A | N/A | Yes | N/A | N/A | — | — | — | — | |
/title
|
Manages screen titles. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/titleraw
|
Controls screen titles with JSON messages. | Yes | Yes | — | — | 1 | — | — | — | — | |
/tm
|
An alias of /teammsg . Specifies the message to send to team.
|
— | — | Yes | 0 | — | — | — | — | — | |
/toggledownfall
|
Toggles the weather. | Yes | Yes | Removed | 2 | 1 | — | — | — | — | |
/tp
|
An alias of /teleport . Teleports entities.
|
Yes | Yes | Yes | 2 | 1 | — | — | — | ||
/trigger
|
Sets a trigger to be activated. | — | — | Yes | 0 | — | — | — | — | — | |
/transferserver
|
Transfers a player to another server. | Removed | Removed | No | 0 | — | — | — | — | — | |
/volumearea
|
Add, remove, or list volume areas. | Yes | — | — | — | 1 | — | — | — | — | |
/w
|
An alias of /tell and /msg . Displays a private message to other players.
|
Yes | Yes | Yes | 0 | 0 | — | — | — | — | |
/wb
|
An alias of /worldbuilder . Ability to edit restricted blocks.
|
Yes | Yes | — | — | 1 | — | — | — | — | |
/weather
|
Sets the weather. | Yes | Yes | Yes | 2 | 1 | — | — | — | — | |
/whitelist
|
Manages server whitelist. | Yes | — | Yes | 3 | 4 | Yes | — | — | — | |
/worldborder
|
Manages the world border. | — | — | Yes | 2 | — | — | — | — | — | |
/worldbuilder
|
An alias of /wb . Ability to edit restricted blocks.
|
Yes | Yes | — | — | 1 | — | — | — | — | |
/wsserver
|
An alias of /connect . Attempts to connect to the websocket server.
|
Yes | Yes | — | — | 0[edu only] 2[BE only] |
— | — | — | — | — |
/xp
|
An alias of /experience [Java Edition only]. Adds or removes player experience.
|
Yes | Yes | Yes | 2 | 1 | — | — | — | — |
Hidden commands[]
These commands are unavailable in general cases. Most of them can be accessed with a Websocket Server.
Command | Description | BE | EE |
BE&EE OP level |
MP only | ||||
---|---|---|---|---|---|---|---|---|---|
/agent
|
Controls the agent. | Yes | Yes | 0[edu only] 1[BE only] |
— | — | — | — | |
/codebuilder
|
Sets Code Builder state for a player. | — | Yes | 1 | — | — | — | — | — |
/classroommode
|
Ability to edit restricted blocks. | — | Yes | 0 | — | — | — | — | — |
/closechat
|
Closes the chat window of the local player if it is open. | — | Yes | 0 | — | — | — | — | — |
/closewebsocket
|
Closes websocket connection if there is one. | Yes | Yes | 0 | — | — | — | — | — |
/code
|
Launches Code Builder. | — | Yes | 0 | — | — | — | — | — |
/enableencryption
|
Enable encryption for the current websocket connection. | Yes | Yes | 0 | — | — | — | — | — |
/getchunkdata
|
Gets pixels for a specific chunk. | Yes | Yes | 3 | — | — | — | — | — |
/getchunks
|
Gets list of chunks that are loaded. | Yes | Yes | 3 | — | — | — | — | — |
/geteduclientinfo
|
Shows the information about the client. | — | Yes | 0 | — | — | — | — | — |
/geteduserverinfo
|
Shows the information about the server. | Yes | — | 0 | Yes | — | — | — | — |
/getlocalplayername
|
Shows the name of the local player. | Yes | Yes | 0 | — | — | — | — | — |
/getspawnpoint
|
Gets the spawn position of the specified player(s). | Yes | Yes | 3 | — | — | — | — | — |
/gettopsolidblock
|
Gets the position of the top non-air block below the specified position. | Yes | Yes | 0[edu only] 1[BE only] |
— | — | — | — | — |
/globalpause
|
Sets or gets the paused state of the game for all players. | Yes | Yes | 3 | — | — | — | — | — |
/lesson
|
Handle Educational Lesson reporting. | — | Yes | 0 | — | — | — | — | — |
Lists the information about players on the server. | Yes | Yes | 3 | — | — | — | — | ||
/querytarget
|
Gets transform, name, and id information about the given target entity or entities. | Yes | Yes | 0[edu only] 2[BE only] |
— | — | — | ||
/spawnitem
|
Spawns an item entity at position. | — | Yes | 0 | — | — | — | — | |
/takepicture
|
Takes a photo of a player or from a player's point of view. | Yes | Yes | 1 | — | — | — | — |
Removed commands[]
Command | Description | Version Removed | Reason for Deletion | BE | EE | JE | JE OP level | BE&EE OP level | MP Only | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gives or takes an achievement from a player | Java Edition 1.12 (17w13a) |
Achievements were superseded by advancements | — | — | Removed | 2 | — | — | — | — | — | ||
/banip
|
Bans a player by IP number | Java Edition Indev 0.31 | Superseded by /ban-ip
|
— | — | Removed | ? | — | MP | — | — | — | |
/blockdata
|
Modifies the data tag of a block | Java Edition 1.13 (17w47a) |
Superseded by /data
|
— | — | Removed | 2 | — | — | — | — | — | |
/broadcast
|
Broadcasts a message across the entire server | Java Edition Classic 0.0.16a_01 | Superseded by /say
|
— | — | Removed | 1 | — | — | — | — | — | — |
/chunk
|
Force chunks to load constantly or not | Java Edition 1.13.1-pre1 | Superseded by /forceload
|
— | — | Removed | 2 | — | — | — | — | — | |
/clearfixedinv
|
Clears fixed inventory slots | Pocket Edition v0.16.0 alpha (build 2) |
? | Removed | Removed | — | — | ? | ? | — | — | — | |
/detect
|
Execute a command when condition is met. | Bedrock Edition 1.2.0 | Superseded by /execute
|
Removed | — | — | — | 1 | — | — | — | — | — |
/entitydata
|
Modifies the data tag of an entity | Java Edition 1.13 (17w45b) |
Superseded by /data
|
— | — | Removed | 2 | — | — | — | — | — | |
/executeasself
|
Execute a command. | ? | ? | Removed | Removed | — | — | 0 | — | — | — | — | — |
/home
|
Teleports player to the world spawn | Java Edition Alpha v1.2.5 | Superseded by /kill
|
— | — | Removed | 0 | — | — | — | — | — | — |
/mixer
|
Mixer interactivity control. | Bedrock Edition 1.16.210 | Mixer was discontinued | Removed | — | — | — | 0 | — | — | — | — | — |
/locatebiome
|
Locates biomes. | Java Edition 1.19 (22w19a) |
Superseded by /locate
|
— | — | Removed | ? | ||||||
/placefeature
|
Used to place a configured feature at a given location. | Java Edition 1.19 (22w18a) |
Superseded by /place
|
— | — | Removed | 2 | — | — | — | — | ||
/position
|
Toggles player coordinates to be displayed on the HUD. | Education Edition 1.0.21 | Superseded by /gamerule
|
— | Removed | — | — | 0 | — | — | — | — | — |
/replaceitem
|
Replaces items in inventories. | Java Edition 1.17 (20w46a) |
Superseded by /item
|
Available | Available | Removed | 2 | — | — | — | |||
/resupply
|
Update the villagers' supply for economic trade. | ? | ? | Removed | — | — | 2 | — | — | — | — | — | |
/setfixedinvslot
|
Sets fixed inventory slot with a specific item. | Pocket Edition v0.16.0 alpha (build 2) |
? | Removed | Removed | — | — | ? | ? | — | — | — | |
/setfixedinvslots
|
Sets the amount of fixed inventory slots | Pocket Edition v0.16.0 alpha (build 2) |
? | Removed | Removed | — | — | ava Edi | on Inde | — | — | — | |
/setspawn
|
Sets the current location as the default spawn location for new players | Java Edition Indev 0.31 | Superseded by /setworldspawn
|
— | — | Removed | 2 | — | — | — | — | — | — |
/solid
|
Toggles between placing stone and placing bedrock | Java Edition Indev 0.31 | Bedrock was added to the creative inventory as a separate item | — | — | Removed | 2 | — | — | — | — | — | — |
/stats
|
Update objectives from command results | Java Edition 1.13 (17w45a) |
Merged with /execute
|
— | — | Removed | 2 | — | — | — | |||
/toggledownfall
|
Toggles the weather | Java Edition 1.13 (17w45a) |
Redundancy with /weather
|
Available | Available | Removed | 2 | — | — | — | — | — | |
/transferserver
|
Transfer player to a server. | Bedrock Edition 1.2.3 | ? | Removed | Removed | — | — | — | — | — | — | — | — |
/unban
|
Pardons a banned player | Java Edition Alpha v1.0.16 | Superseded by /pardon
|
— | — | Removed | 3 | — | MP | — | — | — | |
/videostream
|
Attempts to connect to the websocket server to send a video stream. | ? | ? | Removed | — | — | — | 1 | — | — | - | — | — |
/videostreamaction
|
Attempts to run a action on video stream. | ? | ? | Removed | — | — | — | 1 | — | — | - | — | — |
/warden_spawn_tracker
|
Sets the spawn state of the warden. | Java Edition 1.19 (22w11a) |
Temporary Command. | — | — | Removed | 2 | — | — | — | — | — |
Other removed commands[]
Developer command[]
Developer commands are only enabled in internal development builds of Bedrock Edition, and are not normally present in release versions.
Agent commands[]
Superseded by /agent
/move
/turn
/attack
/destroy
/drop
/dropall
/inspect
/inspectdata
/detect
/detectredstone
/transfer
/createagent
/tpagent
/collect
/till
/place
/getitemcount
/getitemspace
/getitemdetail
Joke commands[]
These commands only exist in April Fools versions of the game.
History[]
Command additions and changes[]
Java Edition Classic | |||||
---|---|---|---|---|---|
0.0.16a | Added commands. | ||||
Java Edition Indev | |||||
0.31 | ? | Removed all commands. | |||
Java Edition Alpha | |||||
v1.0.16 | Re-added several commands. | ||||
Java Edition | |||||
1.3.1 | 12w16a | Added cheats mode. | |||
12w25a | Cheats can now be turned on or off when opening a world to other players through LAN. | ||||
1.8 | 14w03a | NBT data now supports using string IDs rather than numerical IDs. | |||
Numerical IDs no longer work in other parts of commands, though they still work for NBT data. | |||||
1.11 | 16w32a | Added block state support to commands. | |||
1.13 | 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. | |||
17w46a | The player now has the option to toggle automatic command suggestions. | ||||
The command UI has a new prototype, and now works in multiplayer. | |||||
17w47a | Added an option in chat to toggle automatic command suggestions. | ||||
17w48a | Tweaked the command suggestion UI. | ||||
Reworked tab-completion for coordinates. | |||||
17w50a | Local coordinates can now be specified in commands using ^ .
| ||||
Tab-completing when not targeting a block suggests ~ ~ ~ . | |||||
18w01a | Changed all custom names (blocks, items, entities, block entities) to translatable text components. | ||||
Thrower and Owner nbt keys of item entities are no longer strings, but are instead compounds with two longs named L and M . | |||||
owner nbt key of snowballs, eggs and ender pearls are no longer strings, but are instead compounds with two longs named L and M . | |||||
18w02a | Errors during a command are now a nicer error message (with a tool tip for more info). | ||||
Server commands now run from world spawn in the Overworld, instead of at 0,0,0 . | |||||
18w03a | Improved performance of command parsing and command execution. | ||||
18w05a | Added basic entity selector suggestions in the command UI. | ||||
A warning is now logged for ambiguous commands. | |||||
18w06a | Added command suggestions for entity selectors. | ||||
Whitespaces are now allowed in entity selectors & block state arguments. | |||||
September 26, 2018 | Brigadier open-sourced under the MIT license. (Source code previously was available on the library site, with no license specified). | ||||
1.16 | 20w06a | Added /locatebiome . | |||
20w17a | Added /attribute . | ||||
1.17 | 20w46a | Removed /replaceitem . Replaced with /item replace . | |||
1.18 | 21w37a | Added /jfr . | |||
1.18.2 | 22w03a | Added /placefeature . | |||
1.19 | Deep Dark Experimental Snapshot 1 | Added /warden_spawn_tracker . | |||
22w11a | Removed /warden_spawn_tracker . | ||||
22w18a | Removed /placefeature . Replaced with /place feature . | ||||
22w19a | Removed /locatebiome . Replaced with /locate biome .
| ||||
Finding structures from /locate now uses /locate structure . | |||||
1.19.3 | 22w46a | Added /fillbiome . | |||
1.19.4 | 23w03a | Added /ride . | |||
23w06a | Added /damage . | ||||
1.20 | 23w16a | Added /return . | |||
1.20.2 | 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 command_history.txt in the .minecraft folder. | |||||
Added /random . | |||||
Pocket Edition Alpha | |||||
v0.7.4 | Added support for commands, though none are implemented yet. | ||||
v0.16.0 | build 1 | Added commands. | |||
Functionality of most commands is equivalent to Java Edition 1.10 usage. Differences include: no support for data tags. | |||||
Pocket Edition | |||||
1.0.0 | alpha 0.17.0.1 | Added /locate , /connect , and /fly . | |||
alpha 0.17.0.2 | Removed /locate . | ||||
alpha 1.0.0.0 | Re-added /locate , currently can locate strongholds only. | ||||
1.0.5 | alpha 1.0.5.0 | Added more commands. | |||
1.1.0 | alpha 1.1.0.0 | Added dodaylightcycle , doentitydrops , dofiretick , domobspawning , domobloot , dotiledrops , doweathercycle , keepinventory and mobgriefing to /gamerule .
| |||
CanPlaceOn and CanDestroy are now in /replaceitem and /give . | |||||
/locate can now find other structures. | |||||
alpha 1.1.0.3 | Added /setmaxplayers . | ||||
Bedrock Edition | |||||
1.2.0 | ? | A new command parsing system is now used. | |||
beta 1.2.0.2 | Added /tickingarea .
| ||||
/summon can now summon projectiles. | |||||
beta 1.2.0.31 | Coordinates are now a gamerule to /gamerule . | ||||
1.5.0 | |||||
Added /ability , /immutableworld , and /worldbuilder . | |||||
1.6.0 | beta 1.6.0.6 | doInsomnia is now a gamerule to /gamerule . | |||
1.7.0 | beta 1.7.0.2 | Added /scoreboard .
| |||
commandblocksenabled is now a gamerule to /gamerule . | |||||
1.8.0 | beta 1.8.0.8 | randomtickspeed is now a gamerule to /gamerule .
| |||
Added /particle and /reload . | |||||
showcoordinates dofiretick tntexplodes domobloot naturalregeneration dotiledrops and pvp no longer require cheats when using /gamerule . | |||||
1.9.0 | beta 1.9.0.0 | immediateRespawn and showDeathMessages are now a gamerule to /gamerule .
| |||
Added more particles (View all) to /particle . | |||||
Added /tellraw . | |||||
1.11.0 | beta 1.11.0.3 | Added /mobevent . | |||
1.12.0 | beta 1.12.0.2 | spawnradius , sendcommandblockfeedback , maxcommandchainlength and commandblockoutput are now gamerules to /gamerule .
| |||
Added more particles (View all) to /particle . | |||||
1.14.0 | showtags is now a gamerule to /gamerule . | ||||
1.16.0 | Added /kick .
| ||||
/spawnpoint can now be used in the nether. | |||||
1.16.100 | beta 1.16.100.52 | Added /playanimation , /ride , and /structure . | |||
beta 1.16.100.54 | Added /fog . | ||||
beta 1.16.100.57 | Added /camerashake , /clearspawnpoint , and /event . | ||||
beta 1.16.100.58 | Added /music . | ||||
beta 1.16.100.59 | Added /schedule .
| ||||
/camerashake now have two types of shakes. | |||||
beta 1.16.100.60 | /structure can now animate the placement of a structure. | ||||
1.16.210 | beta 1.16.210.53 | freezeDamage is now a gamerule to /gamerule .
| |||
/clone , /fill , and /setblock now have a new slash command options for passing in a list of block states to set on the block being spawned. | |||||
Removed /mixer . | |||||
beta 1.16.210.54 | You can now stop camera shaking in /camerashake .
| ||||
Re-added /mixer . | |||||
You can now delete structures in /structure . | |||||
beta 1.16.210.58 | Removed /mixer again. | ||||
beta 1.16.210.60 | Added /gametest . | ||||
1.17.10 | beta 1.17.10.22 | Added /dialogue . | |||
1.17.30 | beta 1.17.20.20 | respawnBlocksExplode is now a gamerule to /gamerule . | |||
1.18.0 | beta 1.18.0.21 | Added /loot . | |||
beta 1.18.0.22 | Removed /loot . | ||||
1.18.10 | beta 1.18.10.21 | Re-added /loot . | |||
beta 1.18.10.26 | Added /damage . | ||||
1.18.30 | beta 1.18.20.21 | Added /volumearea . | |||
1.19.0 | beta 1.19.0.30 | Added /script . | |||
1.19.10 | beta 1.19.10.23 | /locate can now find biomes. | |||
1.19.60 | beta 1.19.60.22 | Added /scriptevent . | |||
1.19.80 | beta 1.19.80.20 | Added command suggestions for block states. | |||
beta 1.19.80.21 | Added /inputpermission . | ||||
1.20.0 | beta 1.20.0.22 | Added /camera . | |||
1.20.10 | beta 1.20.10.21 | Added /recipe . |
April Fools command[]
Java Edition | |||||
---|---|---|---|---|---|
20w14∞ | Added /debugdim and /warp . | ||||
23w13a or b | Added /transform and /vote . |
Issues[]
Issues relating to "Commands" are maintained on the bug tracker. Report issues there.
See also[]
References[]
Editions |
| ||||||
---|---|---|---|---|---|---|---|
Development |
| ||||||
Technical | |||||||
Multiplayer | |||||||
Exclusive features |
| ||||||
Removed |