Command list and command introduction (1/3)
This page excerpts the reference from MS Learn (MicrosoftDocs/minecraft-creator a9fd1c0, CC BY 4.0). Relative links in the original are removed.
(Source: ms-learn, creator/Reference/Content/CommandsReference/Examples/CommandList.md)
Commands Documentation
World Editing
| Command | Description |
|---|---|
| clearspawnpoint | Removes the spawn point for a player. |
| clone | Clones a set of blocks from one region to another. |
| fill | Fills all or parts of a region with a specific block. |
| place | Places a jigsaw structure, feature, or feature rule in the world. |
| setblock | Changes a block to another block. |
| setworldspawn | Sets the location where new players or players who die will spawn in the world. |
| spawnpoint | Sets the spawn point for a player. |
| spreadplayers | Teleports entities to random locations. |
| structure | Saves or loads a structure in the world. |
Entity Management
| Command | Description |
|---|---|
| damage | Apply damage to the specified entities. |
| effect | Add or clear status effects. |
| enchant | Adds an enchantment to a player's selected item. |
| event | Triggers an event for the specified entity or entities. |
| kill | Kills entities like players and mobs. |
| playanimation | Makes one or more entities play a one-off animation. |
| replaceitem | Replaces items in inventories. |
| ride | Makes entities ride other entities, stops entities from riding, makes rides evict their riders, or summons rides or riders. |
| summon | Summons an entity. |
| tag | Manages tags stored in entities. |
Player
| Command | Description |
|---|---|
| aimassist | Enable Aim Assist |
| clear | Clears items from player inventory. |
| controlscheme | Sets or clears control schemes for the camera(s) of selected player(s). |
| gamemode | Sets a player's game mode. |
| give | Gives an item to a player. |
| hud | Configures whether elements of the on-screen display (alternately known as the 'heads up display', or 'HUD') are visible on the screen. |
| inputpermission | Optionally enables or disables input permissions for a player. |
| teleport | Teleports entities to specific locations. |
| xp | Adds or removes player experience. |
Camera
| Command | Description |
|---|---|
| camera | Transforms the camera for the selected player(s) to a different perspective. |
| camerashake | Applies shaking to the players' camera with specified intensity and duration. |
World Settings
| Command | Description |
|---|---|
| changesetting | Changes a setting on the dedicated server while it's running. |
| daylock | Locks and unlocks the day-night cycle. |
| difficulty | Sets the difficulty level (Peaceful, Easy, Normal, Hard) using difficulty enum or integer. |
| gamerule | Sets or queries a game rule value. |
| mobevent | Controls what mob events are allowed to run. |
| tickingarea | Add, remove, or list ticking areas. |
| time | Changes or queries the world's game time. |
| toggledownfall | Toggles the weather. |
| weather | Sets the weather in the environment. |
Chat & Communication
| Command | Description |
|---|---|
| dialogue | Opens NPC dialogue for a player. |
| me | Displays a message about yourself. |
| say | Sends a message in the chat to other players. |
| tell | Sends a private message to one or more players. |
| tellraw | Sends a JSON message to players. |
| title | Controls the text and behavior for screen titles using plain text. |
| titleraw | Controls the text and behavior for screen titles using JSON messages. |
Data & Logic
| Command | Description |
|---|---|
| execute | Executes a command on behalf of one or more entities. |
| function | Runs commands found in the corresponding function file. |
| schedule | Schedules an action to be executed once an area is loaded, or after a certain amount of time. |
| scoreboard | Tracks and displays scores for various objectives. |
| testfor | Counts entities (players, mobs, items, etc.) matching specified conditions. |
| testforblock | Tests whether a certain block is in a specific location. |
| testforblocks | Tests whether the blocks in two regions match. |
Server & Admin
| Command | Description |
|---|---|
| allowlist | Manages the server allowlist. |
| deop | Revokes operator status from a player. |
| kick | Kicks a player from the server. |
| list | Lists players on the server. |
| op | Grants operator status to a player. |
| packstack | Prints client or server pack stack to chat |
| permission | Reloads and applies permissions. |
| reload | Reloads all function and script files from all behavior packs. |
| reloadconfig | Reloads configuration files relating to variables, secrets, permissions, etc. |
| reloadpacketlimitconfig | Reload packet limit config from file |
| save | Control or check how the game saves data to disk. |
| sendshowstoreoffer | Available on dedicated server only with administrator permissions. |
| setmaxplayers | Sets the maximum number of players for this game session. |
| stop | Stops the server. |
| transfer | Transfers a player to another server. |
| wsserver | Attempts to connect to the websocket server on the provided URL. |
Scripting
| Command | Description |
|---|---|
| gametest | [Requires the Beta APIs experiment]. |
| script | Debugging options for script within Minecraft. |
| scriptevent | Causes an event to fire within script with the specified message ID and payload. |
Sound & Visuals
| Command | Description |
|---|---|
| fog | Add or remove fog settings file. |
| music | Allows you to control playing music tracks. |
| particle | Creates a particle emitter |
| playsound | Plays a sound. |
| stopsound | Stops a sound. |
Loot & Recipes
| Command | Description |
|---|---|
| loot | Drops the given loot table into the specified inventory or into the world. |
| recipe | Supports unlocking of built-in (vanilla) recipes that a particular player can craft with. |
Help
| Command | Description |
|---|---|
| help | Running /help in the chat by itself will list every command you can run. |
Other
| Command | Description |
|---|---|
| locate | Finds the nearest specified biome or structure if it exists in the current dimension. |
| project | This command contains additional tools for managing an Editor project. |
(Source: ms-learn, creator/Reference/Content/CommandsReference/Examples/CommandTypeList.md)
Command Argument Types Documentation
| Command Argument Types | Description |
|---|---|
| Entity Selector | Targets entities. |
| Biome | A biome identifier. |
| Block ID | A block type identifier. |
| Block Name | A block type identifier. |
| Block Position | Block coordinates as integers. |
| Boolean | A true or false value. |
| Boolean | A true or false value. |
| Camera Preset | Named camera preset from behavior packs. |
| Clip Mode | How to handle entity clipping during camera/spectator mode. |
| Comparison Operator | Operator for comparing values in scoreboard tests. |
| Difficulty | The world difficulty level. |
| Dimension | A dimension identifier. |
| Easing Type | Animation easing function for camera transitions. |
| Effect | A status effect (potion effect) identifier. |
| Enchantment | An enchantment identifier. |
| Enchantment | An enchantment identifier. |
| Entity Type | An entity type identifier. |
| Entity Type | An entity type identifier (mob, item, projectile, etc.). |
| File Path | A path to a file or resource. |
| Decimal Number | A number that can include decimals. |
| Integer Range | A range of integers, or a single integer. |
| Game Mode | The player's game mode. |
| Game Rule | A world setting that can be changed. |
| Identifier | A unique identifier string. |
| Integer | A whole number (no decimals). |
| Integer | A whole number (no decimals). |
| Item ID | An item type identifier. |
| Item Name | An item type identifier. |
| JSON Object | A JSON object with key-value pairs. |
| Message | A text message. |
| Message | A text message that will be displayed to players. |
| Objective Criteria | The criteria type for a scoreboard objective. |
| Scoreboard Objective | Name of a scoreboard objective. |
| Scoreboard Operation | Mathematical operation for scoreboard calculations. |
| Function Path | Path to a function file within a behavior pack. |
| Player Selector | Targets one or more players. |
| Block Position | A 3D block position (integer coordinates). |
| Position (x y z) | A 3D position in the world. |
| Suffixed Value | A value with a unit suffix. |
| Raw JSON Text | A JSON text component for rich formatting. |
| Relative Number | A number that can be relative to current value using ~. |
| RGB Color | Color value as red, green, blue components. |
| Rotation Value | A rotation angle in degrees. |
| Entity Selector | Targets one or more entities using selector syntax. |
| Slot Number | Numeric slot index within a slot type. |
| Equipment Slot Type | Category of inventory or equipment slot. |
| Text String | A text value. |
| Structure Type | A structure identifier for locate command. |
| Target Selector | Targets entities or players. |
| Time | Time value in ticks or named time. |
| Value | A numeric value. |
| Weather Type | The weather condition. |
| Pitch Rotation | Vertical rotation (pitch) in degrees. |
| Yaw Rotation | Horizontal rotation (yaw) in degrees. |
(Source: ms-learn, creator/Documents/CommandsIntroduction.md)
Introduction to Commands
Commands are specific instructions that Minecraft: Bedrock Edition will carry out. These instructions can be as simple as changing the time of day or as complex as setting up and working with a scoreboard. There are a wide variety of commands, and each has its own potential to improve your content.
Content creators use commands to change or react to the environment around the player. Rather than having a static world, the player would be able to perform a task that a command system could detect and respond to in some way. An example of this is detecting if a player has placed a colored wool block at a specific location for a "Complete the Monument" style of map.
:::image type="content" source="Media/Commands/Introduction-to-Commands.jpg" alt-text="Image showcasing four different time of day settings":::
In this tutorial, you'll learn the following:
[!div class="checklist"]
- What commands are and how to begin using them.
- Command syntax.
- How to use target selectors and selector parameters.
Enabling Commands
Before getting started with commands, cheats must be enabled. This can be done when you create a world or when you edit an existing one. Be aware that enabling cheats will disable achievements for that world.
Activating cheats lets you use commands in the chat interface. Running commands in the chat is essential for getting the first command block in a newly created world, which must also be enabled (in the same menu) in order to use them. Command blocks will be enabled by default, so you do not have to change that option.
While not required, it's helpful to set the default game mode to creative when starting out, as command blocks can only be edited in creative mode. Setting the default game mode to creative will also activate cheats.
Finally, you may need to enable the "operator commands" permission for yourself in order to run commands in the chat and access command blocks. While this setting is on by default for new worlds you create, you may need to change this on previously created worlds or for other players you would like to grant this permission to. This can be done by opening the pause menu while in the world and clicking the icon to the right of your player.
A list of various permissions will be shown. The "operator commands" permission in particular must be enabled in order to use commands in the chat and access command blocks.
Using the chat for commands
The first step to learning commands is learning how to use the chat functionality. This is where you run simple commands, learn syntax, test, and ultimately open the gateway to command blocks. If your settings and permissions are set correctly, typing a forward slash / in the chat will display a large number of commands.
A quick-action button also becomes available to generate a command for specific situations (such as changing the time of day or the current weather).
As you type, the list of commands displayed on the chat screen will filter to match the characters you input. You can press tab to cycle through the list at any time in order to choose the command to run. When the name of the command has been fully typed out, the list of commands changes to a list of syntaxes for the selected command.
[!Note] If you open the chat and press the up arrow on your keyboard, you can see the previous commands you've entered. This comes in handy when you're entering variations of the same command over and over. And over.
Command syntax
All commands follow the same grammar:
- Start the command with a forward slash (
/). - Follow the slash with the name of the command.
- If there are any arguments to the command, they come after the command, separated by spaces.
For example, the /say command sends a message to the chat for all players to see:
/say Hello World
- It starts with a forward slash.
- The command's name is "say".
- Because there are arguments, a space is placed after the name.
- Then, the only argument for
/sayis provided, the message to display.
As a result, "Hello World" will be printed out in the chat.
Arguments
Different commands need different arguments. The /help command describes both a command and the arguments it takes. The auto-complete feature, which is available in the chat when typing out a command, displays the same information.
For example, typing /help testfor in the chat will provide the available syntax for the /testfor command.
/testfor <victim: target>
The command has only one argument: a target to test for the existence of. Filling in the argument with a player name and running the command will print out a success message if the named player is logged into the world.
/testfor PlayerName
Arguments can be required, optional, or literal.
A required argument is shown in help surrounded by angle brackets, like <this>. In the case of the /testfor command, you can tell that the only argument it has is required. because it is surrounded by angle brackets. If the argument is not provided, the command will fail to run.
Required arguments have a short descriptor of the argument as well as the expected input type. For /testfor, the argument is the victim, and the input type is target: a player name or target selector. Other commands can take different kinds of input values for the same argument, such as /difficulty:
/difficulty <difficulty: Difficulty>
/difficulty <difficulty: int>
The /difficulty command sets the world's difficulty level. You can specify it as a Difficulty, the name of a difficulty level such as "peaceful", "easy", "normal", or "hard"; you can also specify it as an int, an integer number that corresponds to a difficulty level from 0 to 3. Either of these commands sets the difficulty to hard:
/difficulty hard
/difficulty 3
An optional argument is shown surrounded by square brackets, like [this]. Optional arguments don't have to be provided.
/gamemode <gameMode: GameMode> [player: target]
/gamemode <gameMode: int> [player: target]
As with the /difficulty command, the /gamemode command has two different ways to do the same thing: you can set the game mode by using the name of a GameMode, or using an integer from 0 to 2 corresponding to a game mode.
The gameMode argument is required, but the command takes an optional argument to specify a player who will have their game mode changed. The input type is "target", which accepts either a player name or a target selector. Without supplying the optional argument, the command will still run. Doing so changes the game mode of the player who executed the command. By filling in the optional argument, the game mode of the target will be changed instead.
Either of the following commands will set the game mode for the specified player ("PlayerName") to survival mode:
/gamemode survival PlayerName
/gamemode 0 PlayerName
A literal argument should be typed exactly as is, and when shown in help, it has no descriptors or value types.
A literal argument that's the first argument to a command generally acts as a subcommand. For example, the /time command has a literal argument called "set":
/time set <amount: int>
/time set <time: TimeSpec>
Since set is a subcommand, it's not shown in angle brackets, but it's still required.
/time set 6000
/time set noon
A literal argument can have multiple accepted values. In those cases, a vertical bar separates the possible values. The /weather command uses this for the type of weather to apply:
/weather <clear|rain|thunder> [duration: int]
/weather rain 10000
An optional literal argument will be shown surrounded by square brackets. The final argument of /testforblocks is an optional literal argument that can be either "all" or "masked". If none is specified, it defaults to "all". The "masked" option will cause the comparison to ignore air blocks, allowing any block to exist at the destination where there would be an air block at the source.
/testforblocks <begin: x y z> <end: x y z> <destination: x y z> [masked|all]
/testforblocks 0 64 0 20 64 20 100 50 100
/testforblocks 0 64 0 20 64 20 100 50 100 masked
Input types
Any argument that isn't a literal argument will specify the expected input type after the descriptor.
/command <descriptor: type>
/command [descriptor: type]
There are a large number of input types. The most common ones are primitive numeric values, but there are many that are exclusive to one command. The table below details the most common input types and some popular commands they belong to. Most unique input types, such as "GameMode" from the /gamemode command, can easily have their input checked by using the auto-complete feature in the chat.
| Type | Description | Common commands |
|---|---|---|
| Boolean | true or false. | /effect, /gamerule |
| int | An integer (1, 2, 3). | /give, /scoreboard, /time, /weather, /xp |
| float | A decimal number (1, 2.3, 4, 5.6). | /spreadplayers |
| string | Either a single word or text within "quotation marks". | /scoreboard, /summon, /tag |
| message | Text that does not need to be in quotation marks. | /me, /msg, /say, /tell, /title, /w |
| x y z | 3 floats separated by spaces to specify coordinates.<br><br>Each value can also be a tilde (~), which indicates no change from the execution origin on that axis, or a tilde followed by a number (~5) to indicate the number of blocks away from the execution origin on that axis. | /clone, /execute, /fill, /setblock, /summon, /teleport, /testforblock |
| Block | A block ID. | /clone, /execute, /fill, /setblock, /testforblock |
| Item | An item ID. | /clear, /give, /replaceitem |
| EntityType | An entity ID. | /summon |
| json | JSON-formatted text. | /give, /replaceitem, /summon, /tellraw, /titleraw |
| target | Either a player name or a target selector. | /clear, /execute, /gamemode, /give, /kill, /replaceitem, /scoreboard, /tag, /teleport, /testfor |
What's Next?
Now that you've learned about commands, you can learn more about target selectors, commands, or about how to use command blocks to move beyond the chat window.
[!div class="nextstepaction"] Target Selectors Popular Commands Command Blocks
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |