Updated:
How to read this list
<angle brackets>are required and[square brackets]are optional.- Targets such as
@p,@aand@eare explained in the target selector guide. - Commands need cheats on in single player, or operator rights on a server.
Items and inventory
| Command | What it does | Syntax |
|---|---|---|
| /give | Gives items, with names, enchantments and other data. | /give <target> <item> [count] |
| /clear | Removes items from an inventory. A count of 0 just counts them. | /clear [target] [item] [max] |
| /item | Replaces or copies items in inventory, equipment and container slots (Java). | /item replace entity <target> <slot> with <item> |
| /replaceitem | Bedrock version of /item. | /replaceitem entity <target> slot.armor.head 0 <item> |
| /enchant | Enchants the held item, up to the normal max level. | /enchant <target> <enchantment> [level] |
| /xp, /experience | Adds, removes or checks experience points and levels. | /xp add <target> <amount> [points|levels] |
| /loot | Drops loot table or block-break results into a player or container. | /loot give <target> loot <loot_table> |
| /recipe | Unlocks or locks recipe book recipes. | /recipe give <target> * |
Players and entities
| Command | What it does | Syntax |
|---|---|---|
| /summon | Spawns mobs and other entities, with names, gear and data. | /summon <entity> [pos] [nbt] |
| /kill | Kills targets. A bare @e also hits items and armor stands. | /kill [target] |
| /tp, /teleport | Moves players or entities to coordinates or another target. | /tp <target> <x> <y> <z> |
| /effect | Gives or clears status effects. | /effect give <target> <effect> [seconds|infinite] [amplifier] [hide] |
| /attribute | Reads or sets attributes such as max health, scale and speed (Java). | /attribute <target> <attribute> base set <value> |
| /damage | Deals a set amount of a chosen damage type. | /damage <target> <amount> [type] |
| /ride | Mounts or dismounts entities. | /ride <target> mount <vehicle> |
| /tag | Adds or removes tags used by selectors and /execute. | /tag <target> add <tag> |
| /gamemode | Changes game mode. | /gamemode <survival|creative|adventure|spectator> [target] |
| /spawnpoint | Sets a player respawn point. | /spawnpoint [target] [pos] |
| /spreadplayers | Scatters players or entities randomly across an area. | /spreadplayers <x> <z> <spread> <range> <teams> <targets> |
| /spectate | Locks a spectator view to another entity (Java). | /spectate [target] [player] |
Blocks and world
| Command | What it does | Syntax |
|---|---|---|
| /setblock | Places or replaces one block. | /setblock <pos> <block> [destroy|keep|replace] |
| /fill | Fills an area with blocks, up to 32,768 at once. | /fill <from> <to> <block> [mode] |
| /clone | Copies a region to another place. | /clone <from> <to> <destination> |
| /fillbiome | Changes the biome of an area (Java 1.19.3+). | /fillbiome <from> <to> <biome> |
| /place | Generates structures, features or templates (Java). | /place structure <structure> [pos] |
| /locate | Finds the nearest structure or biome. | /locate structure <structure> |
| /forceload | Keeps chunks loaded with no player nearby (Java). | /forceload add <x> <z> |
| /tickingarea | Bedrock way to keep an area running. | /tickingarea add <from> <to> [name] |
| /setworldspawn | Sets the world spawn point. | /setworldspawn [pos] |
World settings and time
| Command | What it does | Syntax |
|---|---|---|
| /time | Sets or adds time. | /time set <day|night|noon|midnight|value> |
| /weather | Changes the weather. On Java a bare number is ticks. | /weather <clear|rain|thunder> [duration] |
| /gamerule | Changes world rules. Java 1.21.11 renamed many of them. | /gamerule <rule> <value> |
| /difficulty | Changes difficulty. | /difficulty <peaceful|easy|normal|hard> |
| /defaultgamemode | Sets the game mode for new players. | /defaultgamemode <mode> |
| /seed | Shows the world seed. | /seed |
| /worldborder | Sets the center and size of the world border. | /worldborder set <size> |
| /tick | Changes or freezes the game tick rate (Java 1.20.3+). | /tick freeze |
Display and effects
| Command | What it does | Syntax |
|---|---|---|
| /tellraw | Sends styled chat messages. | /tellraw <target> <text> |
| /title | Shows big text in the middle of the screen. | /title <target> title <text> |
| /bossbar | Shows a bar at the top of the screen (Java). | /bossbar add <id> <name> |
| /particle | Shows particles. | /particle <type> [pos] |
| /playsound | Plays a sound. | /playsound <sound> <source> <target> |
| /stopsound | Stops sounds that are playing. | /stopsound <target> [source] [sound] |
| /say, /msg | Sends chat messages; /msg, /tell and /w are private. | /msg <player> <message> |
| /camera | Moves the camera or fades the screen (Bedrock). | /camera <target> set <preset> |
Logic and data
| Command | What it does | Syntax |
|---|---|---|
| /execute | Runs another command as a target, at a place, or when a condition is true. | /execute as <target> at @s if ... run <command> |
| /scoreboard | Tracks numbers per player: points, money, timers. | /scoreboard objectives add <name> <criteria> |
| /team | Creates teams, name colors and friendly fire rules. | /team add <name> |
| /data | Reads or edits entity and block data (Java). | /data get entity <target> [path] |
| /function | Runs a data pack function. | /function <namespace:name> |
| /schedule | Runs a function after a delay. Bedrock has a different /schedule. | /schedule function <function> <time> |
| /trigger | Lets non-operators change one allowed score (Java). | /trigger <objective> |
| /random | Rolls a random number (Java 1.20.2+). | /random value <min>..<max> |
| /advancement | Grants or revokes advancements (Java). | /advancement grant <target> everything |
Server
| Command | What it does | Syntax |
|---|---|---|
| /op, /deop | Gives or removes operator rights. | /op <player> |
| /kick | Disconnects a player. | /kick <player> [reason] |
| /ban, /pardon | Bans or unbans a player. | /ban <player> [reason] |
| /whitelist | Lets only listed players join. | /whitelist on |
| /publish | Opens a single player world to LAN (Java). | /publish |
| /save-all, /stop | Saves the world or stops the server safely. | /save-all |
| /help | Lists commands or shows one command's syntax. | /help [command] |
Java and Bedrock differences
Most command names are the same on both editions, but the details are not. Bedrock has no item components, uses different IDs for some items, and some commands such as /data, /item and /attribute are Java only. When a command fails on Bedrock, check the edition note in its guide first, then see why a command is not working.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.