+150 Minecraft Commands: Ultimate Java and Bedrock Guide
Minecraft commands let you switch game modes, teleport, give items or run a server. This guide lists 150 commands from Java Edition and Bedrock Edition, grouped by use, with their syntax and examples. It follows the current versions, Java 26.3 and Bedrock 26.60, and points out what has been renamed or removed.
How to use Minecraft commands
In game, press T or / to open the chat, then type the command. The Tab key completes command names and their arguments.
Requirements by edition
| Edition | Requirement |
|---|---|
| Java Edition | In single player, turn on Allow Commands when creating the world. On a server, be an operator. |
| Bedrock Edition | Turn on Activate Cheats in the world settings and be an operator. On a dedicated server, set allow-cheats=true in server.properties. |
In Java, the option has been called Allow Commands since 1.20.5 (it used to be Allow Cheats). An operator on a Java server can run commands even when it is off. In Bedrock, activating cheats disables achievements for that world.
From the OuiPanel console
On a Minecraft server hosted by OuiHeberg, the console in OuiPanel, the game panel, runs commands with full rights, without being logged into the game.
In the side menu, open Console. The server must be running.
Type the command in the "Type a command, without the leading slash" field, for example
op Steve.Click Send or press Enter.
The server's reply appears in the console. The up and down arrows bring back the commands you already sent.

In the console, commands are typed without the slash:
gamemode creative Steve, not/gamemode creative Steve. The@pand@sselectors target nobody from the console, so name the player.
How to read the tables
The Java and Bedrock columns show whether the command exists in each edition. The Access column says whether the command requires operator rights or works for every player. The guide How to manage players on your Minecraft server explains how to give operator rights.
Essential Minecraft commands
The most used commands, the ones to learn first.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/gamemode | Changes the game mode | /gamemode creative | Yes | Yes | Operator |
/tp | Teleports players or entities | /tp Steve 100 64 200 | Yes | Yes | Operator |
/give | Gives items | /give @p diamond 64 | Yes | Yes | Operator |
/kill | Kills entities | /kill @e[type=zombie] | Yes | Yes | Operator |
/time | Sets the time of day | /time set day | Yes | Yes | Operator |
/weather | Changes the weather | /weather clear | Yes | Yes | Operator |
/gamerule | Changes the world rules | /gamerule keep_inventory true | Yes | Yes | Operator |
/effect | Applies effects | /effect give @p strength 60 | Yes | Yes | Operator |
/summon | Summons an entity | /summon minecraft:horse | Yes | Yes | Operator |
/locate | Finds a structure or a biome | /locate structure fortress | Yes | Yes | Operator |
/gamemode, change the game mode
The most used command to switch between modes.
/gamemode <mode> [player]
| Mode | Bedrock shortcut | Description |
|---|---|---|
survival | 0 / s | Survival, the standard mode |
creative | 1 / c | Creative: flying and endless resources |
adventure | 2 / a | Adventure: blocks cannot be broken |
spectator | none | Spectator: flies through blocks |
Numbers and letters only work in Bedrock. Java has only accepted the full mode name since 1.13. Spectator mode has been available in Bedrock without experiments since 1.19.50.
Examples
/gamemode creative
/gamemode survival @a
/gamemode creative Steve
/gamemode 1 Steve
The last line is the Bedrock short form.
/tp and /teleport, teleport
Essential to move fast or bring a player back.
/tp <target> <destination>
/tp <target> <x> <y> <z>
| Syntax | Description |
|---|---|
/tp Steve Alex | Teleports Steve to Alex |
/tp @p 100 64 -300 | Teleports the nearest player to the coordinates |
/tp @a ~ ~10 ~ | Lifts every player by 10 blocks |
/tp @e[type=cow] @p | Brings every cow to the player |
The
~symbol stands for the current position.~10means 10 more blocks on that axis. The^symbol counts from where you look:^ ^ ^5is 5 blocks in front of you.
/give, give items
Hands out items to players.
/give <player> <item> [amount]
| Example | Result |
|---|---|
/give @p diamond 64 | 64 diamonds to the nearest player |
/give @a minecraft:torch 32 | 32 torches to every player |
/give Steve netherite_sword | A netherite sword to Steve |
/give @p enchanted_golden_apple | An enchanted golden apple |
/gamerule, game rules
Changes the basic rules of the world. Java renamed all its rules in 1.21.11: they are now written in lowercase with underscores. Bedrock keeps its one-word names.
/gamerule <rule> <value>
| Java 26.3 | Bedrock | Former Java name | Effect |
|---|---|---|---|
keep_inventory | keepinventory | keepInventory | Keep the inventory after death |
advance_time | dodaylightcycle | doDaylightCycle | Day and night cycle |
spawn_mobs | domobspawning | doMobSpawning | Mob spawning |
mob_griefing | mobgriefing | mobGriefing | Mobs can destroy blocks |
natural_health_regeneration | naturalregeneration | naturalRegeneration | Natural health regeneration |
fire_spread_radius_around_player | dofiretick | doFireTick | Fire spread (Java: radius in blocks, 0 turns it off) |
fall_damage | falldamage | fallDamage | Fall damage |
pvp | pvp | (new in 1.21.9) | Player versus player combat |
Common commands, in Java then in Bedrock:
/gamerule keep_inventory true
/gamerule advance_time false
/gamerule mob_griefing false
/gamerule keepinventory true
/gamerule dodaylightcycle false
/gamerule mobgriefing false
The Guide to Minecraft gamerules covers every rule and its former name.
/time, manage the time
Controls the time of day. A Minecraft day lasts 24,000 ticks.
/time set <value>
/time add <ticks>
/time query <daytime|gametime|day>
| Value | Ticks | Time of day |
|---|---|---|
day | 1000 | Morning |
noon | 6000 | Noon |
night | 13000 | Start of the night |
midnight | 18000 | Midnight |
sunrise | 23000 | Sunrise (Bedrock only) |
sunset | 12000 | Sunset (Bedrock only) |
Examples
/time set day
/time set 6000
/time add 1000
Since 26.1, Java handles time through world clocks. The commands above work as before, and /time pause, /time resume and /time rate <multiplier> were added.
/weather, the weather
Sets the weather, with an optional duration.
/weather <clear|rain|thunder> [duration]
| Command | Effect |
|---|---|
/weather clear | Clear weather |
/weather rain | Rain, or snow in cold biomes |
/weather thunder | Thunderstorm with lightning |
/weather clear 1d | Clear weather for one game day (Java) |
/weather clear 24000 | Clear weather for 24,000 ticks, one game day |
Duration is counted in ticks in both editions. Java also accepts the s (real seconds) and d (game days) suffixes.
Game mode and player commands
These Minecraft commands change the state of players.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/effect | Potion effects | /effect give @p speed 120 2 | Yes | Yes | Operator |
/xp | Gives experience | /xp add @p 30 levels | Yes | Yes | Operator |
/enchant | Enchants an item | /enchant @p sharpness 5 | Yes | Yes | Operator |
/clear | Clears the inventory | /clear @p | Yes | Yes | Operator |
/difficulty | Changes the difficulty | /difficulty hard | Yes | Yes | Operator |
/defaultgamemode | Default mode for new players | /defaultgamemode survival | Yes | No | Operator |
/attribute | Changes attributes | /attribute @p minecraft:max_health base set 40 | Yes | No | Operator |
/spectate | Watches an entity as a spectator | /spectate @e[type=bat,limit=1] | Yes | No | Operator |
/ability | Special abilities (Education) | /ability @p mayfly true | No | Yes | Operator |
/immutableworld | Makes the world immutable | /immutableworld true | No | Yes | Operator |
/effect, potion effects
Applies or removes status effects. The syntax differs between editions: Java uses give and clear, Bedrock does not.
# Java
/effect give <target> <effect> [duration|infinite] [amplifier] [hide_particles]
/effect clear <target> [effect]
# Bedrock
/effect <target> <effect> [duration|infinite] [amplifier] [hide_particles]
/effect <target> clear
| Effect | Numeric ID | Description |
|---|---|---|
speed | 1 | Movement speed |
strength | 5 | Attack strength |
jump_boost | 8 | Higher jumps |
regeneration | 10 | Health regeneration |
resistance | 11 | Damage resistance |
fire_resistance | 12 | Fire immunity |
invisibility | 14 | Invisibility |
night_vision | 16 | Night vision |
Commands expect the effect name. The number is the internal ID, useful when reading old tutorials. The word infinite gives a never-ending effect (Java 1.19.4, Bedrock 1.21.40).
Examples
/effect give @p night_vision infinite 0 true
/effect give @a resistance 60 4
/effect clear @p
/effect @p speed 30 1
The last line is the Bedrock form.
/xp, experience
Manages player experience. Java and Bedrock use different syntaxes.
| Command | Edition | Effect |
|---|---|---|
/xp add @p 1000 points | Java | Gives 1,000 experience points |
/xp add @p 30 levels | Java | Gives 30 levels |
/xp set @p 0 levels | Java | Resets the level to zero |
/xp query @p levels | Java | Shows the current level |
/xp 1000 @p | Bedrock | Gives 1,000 experience points |
/xp 30L @p | Bedrock | Gives 30 levels |
/xp -10L @p | Bedrock | Removes 10 levels |
/enchant, enchantments
Enchants the item held in hand, up to the enchantment's maximum level.
/enchant <target> <enchantment> [level]
| Enchantment | Max level | Items |
|---|---|---|
sharpness | 5 | Swords, axes |
efficiency | 5 | Tools |
unbreaking | 3 | Any equipment |
fortune | 3 | Pickaxes, axes, shovels |
looting | 3 | Swords |
protection | 4 | Armor |
mending | 1 | Any equipment |
Examples
/enchant @p sharpness 5
/enchant @p unbreaking 3
/enchant @p mending 1
/difficulty, difficulty
/difficulty <level>
| Level | Bedrock shortcut | Effects |
|---|---|---|
peaceful | 0 / p | No monsters, fast regeneration |
easy | 1 / e | Weak monsters, hunger does not kill |
normal | 2 / n | Balanced |
hard | 3 / h | Strong monsters, zombies break doors |
Environment and world commands
These Minecraft commands act on the world itself.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/time | Time of day | /time set noon | Yes | Yes | Operator |
/weather | Weather | /weather thunder | Yes | Yes | Operator |
/gamerule | Game rules | /gamerule spawn_mobs false | Yes | Yes | Operator |
/worldborder | World border | /worldborder set 1000 | Yes | No | Operator |
/forceload | Keeps chunks loaded | /forceload add 0 0 | Yes | No | Operator |
/tick | Controls the game speed | /tick freeze | Yes | No | Operator |
/fillbiome | Changes the biome of an area | /fillbiome ~ ~ ~ ~20 ~10 ~20 minecraft:jungle | Yes | No | Operator |
/daylock | Locks the day and night cycle | /daylock true | No | Yes | Operator |
/toggledownfall | Toggles rain | /toggledownfall | No | Yes | Operator |
/tickingarea | Always active areas | /tickingarea add circle ~ ~ ~ 4 farm | No | Yes | Operator |
/mobevent | Mob events | /mobevent minecraft:pillager_patrols_event false | No | Yes | Operator |
/fog | Fog | /fog @p push minecraft:fog_hell myfog | No | Yes | Operator |
/worldborder, the world border (Java)
Manages the edge of the world. Since 1.21.9, it only affects the dimension where the command runs.
/worldborder <set|add|center|damage|warning|get> ...
| Command | Effect |
|---|---|
/worldborder set 5000 | Border 5,000 blocks wide |
/worldborder set 1000 60s | Shrinks to 1,000 blocks over one minute |
/worldborder center 0 0 | Centers the border on 0, 0 |
/worldborder add 500 | Grows by 500 blocks |
/worldborder damage amount 1 | 1 damage point per block outside the border |
Since 1.21.11, the duration is given in ticks. Add s for real seconds or d for game days.
/forceload, chunks kept loaded (Java)
Keeps chunks loaded at all times, for an automatic farm for example. Each forced chunk uses resources, even with no player nearby.
/forceload add <x> <z>
/forceload remove <x> <z>
/forceload query
| Command | Effect |
|---|---|
/forceload add 0 0 | Loads the chunk at 0, 0 |
/forceload add -100 -100 100 100 | Loads a whole area |
/forceload remove all | Unloads all forced chunks |
/tickingarea, ticking areas (Bedrock)
The Bedrock equivalent of /forceload.
/tickingarea add <x1> <y1> <z1> <x2> <y2> <z2> <name>
/tickingarea add circle <x> <y> <z> <radius> <name>
/tickingarea remove <name>
/tickingarea list
/tick, control the game speed (Java)
Added in 1.20.3, it freezes or speeds up the game and measures server load. It needs operator level 3.
| Command | Effect |
|---|---|
/tick query | Shows the target rate and the average time per tick |
/tick freeze | Freezes the world, except players |
/tick unfreeze | Resumes the world |
/tick step 20 | Steps 20 ticks forward while frozen |
/tick rate 40 | Targets 40 ticks per second instead of 20 |
/tick sprint 1d | Runs one game day as fast as possible |
The guide Ticks, TPS and main thread on Minecraft explains what these figures mean.
Teleportation commands
These Minecraft commands move players and find places.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/tp | Teleport | /tp @p 0 100 0 | Yes | Yes | Operator |
/teleport | Long form of /tp | /teleport Steve Alex | Yes | Yes | Operator |
/spawnpoint | A player's respawn point | /spawnpoint @p ~ ~ ~ | Yes | Yes | Operator |
/clearspawnpoint | Removes the respawn point | /clearspawnpoint @p | No | Yes | Operator |
/setworldspawn | World spawn point | /setworldspawn 0 64 0 | Yes | Yes | Operator |
/spreadplayers | Spreads at random | /spreadplayers 0 0 100 500 false @a | Yes | Yes | Operator |
/rotate | Turns an entity (Java 1.21.2) | /rotate @p 90 0 | Yes | No | Operator |
/locate | Finds a structure or a biome | /locate structure stronghold | Yes | Yes | Operator |
/place | Generates a structure | /place structure village_plains | Yes | Yes | Operator |
/structure | Saves and loads structures | /structure save house ~ ~ ~ ~10 ~10 ~10 | No | Yes | Operator |
/locate, find a structure
Gives the coordinates of the nearest structure.
/locate structure <type>
/locate biome <biome>
/locate poi <poi>
| Structure | Command |
|---|---|
| Stronghold | /locate structure stronghold |
| Village (Java) | /locate structure #village |
| Village (Bedrock) | /locate structure village |
| Woodland mansion | /locate structure mansion |
| Ocean monument | /locate structure monument |
| Bastion | /locate structure bastion_remnant |
| Nether fortress | /locate structure fortress |
| Ancient city | /locate structure ancient_city |
| Trial chambers | /locate structure trial_chambers |
In Java, village is a group rather than a structure, so type #village. Bedrock accepts village.
Find a biome:
/locate biome minecraft:mushroom_fields
/locate biome minecraft:cherry_grove
/spreadplayers, spread players
Teleports players at random within an area, handy to start a match.
/spreadplayers <x> <z> <min_distance> <max_range> <respectTeams> <targets>
| Parameter | Description |
|---|---|
x z | Center of the area |
min_distance | Minimum gap between players |
max_range | Maximum spread radius |
respectTeams | true keeps teams together |
Example:
/spreadplayers 0 0 50 500 false @a
Here every player lands between 50 and 500 blocks from the center.
/spawnpoint and /setworldspawn
These two commands set respawn points.
| Command | Scope | Example |
|---|---|---|
/spawnpoint | One player | /spawnpoint Steve 100 64 100 |
/setworldspawn | Everyone | /setworldspawn 0 64 0 |
Building and editing commands
These Minecraft commands build on a large scale.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/setblock | Places a block | /setblock ~ ~ ~ diamond_block | Yes | Yes | Operator |
/fill | Fills an area | /fill 0 0 0 10 10 10 stone | Yes | Yes | Operator |
/clone | Copies an area | /clone 0 0 0 10 10 10 20 0 0 | Yes | Yes | Operator |
/give | Gives items | /give @p diamond_pickaxe | Yes | Yes | Operator |
/clear | Clears the inventory | /clear @p dirt | Yes | Yes | Operator |
/loot | Generates loot | /loot give @p loot minecraft:chests/simple_dungeon | Yes | Yes | Operator |
/item | Manages item slots | /item replace entity @p weapon.mainhand with diamond_sword | Yes | No | Operator |
/replaceitem | Replaces the item in a slot | /replaceitem entity @p slot.weapon.mainhand 0 diamond_sword | No | Yes | Operator |
/fillbiome | Changes the biome | /fillbiome ~ ~ ~ ~10 ~10 ~10 cherry_grove | Yes | No | Operator |
/setblock, place a block
Places a specific block at a position.
/setblock <x> <y> <z> <block> [mode]
| Mode | Effect |
|---|---|
replace | Replaces anything (default) |
destroy | Breaks the old block and drops it |
keep | Only replaces air |
Examples
/setblock ~ ~-1 ~ minecraft:glass
/setblock 100 64 100 diamond_block destroy
/setblock ~ ~ ~ air destroy
/fill, fill an area
Fills a volume with a block.
/fill <x1> <y1> <z1> <x2> <y2> <z2> <block> [mode]
| Mode | Effect |
|---|---|
replace | Replaces everything |
destroy | Destroys the blocks and drops the items |
keep | Only replaces air |
hollow | Hollow cube, the inside becomes air |
outline | Outline only |
replace <old> | Replaces one block type only |
Examples
/fill ~ ~ ~ ~10 ~10 ~10 stone hollow
/fill 0 0 0 100 50 100 air replace water
/fill ~ ~-1 ~ ~20 ~-1 ~20 grass_block
One command changes 32,768 blocks at most. In Java, this limit is set by the
max_block_modificationsrule (commandModificationBlockLimitbefore 1.21.11).
/clone, copy an area
Copies a region to another place.
/clone <x1> <y1> <z1> <x2> <y2> <z2> <dest_x> <dest_y> <dest_z> [mode]
| Mode | Effect |
|---|---|
replace | Copies everything |
masked | Skips air blocks |
filtered <block> | Copies only that block |
move | Moves and clears the source |
Examples
/clone 0 64 0 10 74 10 100 64 100
/clone ~ ~ ~ ~10 ~10 ~10 ~20 ~ ~ masked
Entities and mobs commands
These Minecraft commands handle mobs and other entities.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/summon | Summons an entity | /summon zombie ~ ~ ~ | Yes | Yes | Operator |
/kill | Kills entities | /kill @e[type=!player] | Yes | Yes | Operator |
/tp | Teleports entities | /tp @e[type=cow] @p | Yes | Yes | Operator |
/effect | Effects on entities | /effect give @e[type=zombie] slowness 30 | Yes | Yes | Operator |
/tag | Tags entities | /tag @e[type=pig] add marked | Yes | Yes | Operator |
/data | Reads and edits NBT data | /data get entity @p | Yes | No | Operator |
/damage | Deals damage | /damage @p 5 magic | Yes | Yes | Operator |
/ride | Mounts an entity on another | /ride @p mount @e[type=horse,limit=1,sort=nearest] | Yes | Yes | Operator |
/swing | Swings the arm (Java 26.1) | /swing @e[type=zombie,limit=1] | Yes | No | Operator |
/bossbar | Boss bars | /bossbar add my_boss "Boss" | Yes | No | Operator |
/event | Triggers an entity event | /event entity @e[type=creeper] minecraft:start_exploding_forced | No | Yes | Operator |
Entity selectors
Selectors pick the targets of a command.
| Selector | Target |
|---|---|
@p | Nearest player |
@a | All players |
@r | Random player |
@e | All entities |
@s | Whoever runs the command |
@n | Nearest entity (Java 1.21) |
Common filters:
| Filter | Example | Effect |
|---|---|---|
type | @e[type=zombie] | Zombies only |
distance | @e[distance=..10] | Within 10 blocks |
limit | @e[limit=1] | One entity only |
sort | @e[sort=nearest] | Sorts by distance |
tag | @e[tag=boss] | With the "boss" tag |
name | @e[name="Steve"] | Named "Steve" |
In Bedrock, limit is written c: @e[type=zombie,c=1].
/summon, summon
Spawns an entity. The data in braces (NBT) only works in Java.
/summon <entity> [x] [y] [z] [nbt]
| Example | Result |
|---|---|
/summon zombie | A zombie at your position |
/summon creeper ~ ~ ~ {Fuse:0} | A creeper that explodes at once |
/summon horse ~ ~ ~ {Tame:1b} | A tamed horse |
/summon lightning_bolt | A lightning bolt |
/summon item ~ ~ ~ {Item:{id:"minecraft:diamond",count:64}} | 64 diamonds on the ground |
Since 1.20.5, an item's quantity is written count in lowercase. The old Count form no longer works. Since 1.21.9, /summon refuses monsters on Peaceful difficulty.
/kill, remove entities
/kill <target>
| Command | Effect |
|---|---|
/kill @e | Kills everything, you included |
/kill @e[type=!player] | Kills everything except players |
/kill @e[type=item] | Removes dropped items |
/kill @e[type=zombie,distance=..50] | Zombies within 50 blocks |
/kill @e[type=experience_orb] | Removes experience orbs |
/kill @ealso removes tamed animals, item frames and armor stands. Always add atypefilter.
/tag, tag entities
Adds tags to entities so you can target them later.
/tag <target> add <name>
/tag <target> remove <name>
/tag <target> list
Usage:
/tag @e[type=pig,limit=1] add special
/kill @e[tag=special]
Server administration commands
These Minecraft commands manage players and the server. On an OuiHeberg server, type them in the OuiPanel console, without the slash.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/op | Grants operator rights | /op Steve | Yes | Yes | Operator |
/deop | Removes operator rights | /deop Steve | Yes | Yes | Operator |
/kick | Kicks a player | /kick Steve Reason | Yes | Yes | Operator |
/ban | Bans a player | /ban Steve Cheating | Yes | No | Operator |
/pardon | Lifts a ban | /pardon Steve | Yes | No | Operator |
/ban-ip | Bans an IP address | /ban-ip 192.168.1.1 | Yes | No | Operator |
/pardon-ip | Lifts an IP ban | /pardon-ip 192.168.1.1 | Yes | No | Operator |
/banlist | Ban list | /banlist | Yes | No | Operator |
/whitelist | Whitelist | /whitelist add Steve | Yes | Yes (alias) | Operator |
/allowlist | Allowlist | /allowlist add Steve | No | Yes | Operator |
/list | Online players | /list | Yes | Yes | Everyone |
/stop | Stops the server | /stop | Yes | Yes | Operator |
/save-all | Saves the world to disk | /save-all | Yes | No | Operator |
/save-on | Turns on autosave | /save-on | Yes | No | Operator |
/save-off | Turns off autosave | /save-off | Yes | No | Operator |
/save | Prepares a world backup | /save hold | No | Yes | Operator |
/setidletimeout | Kicks idle players | /setidletimeout 10 | Yes | No | Operator |
/setmaxplayers | Player limit | /setmaxplayers 20 | No | Yes | Operator |
/permission | Reloads permissions (Bedrock server) | /permission reload | No | Yes | Operator |
/transfer | Sends a player to another server | /transfer play.example.com 25565 Steve | Yes | Yes | Operator |
/version | Shows the server version (Java 1.21.6) | /version | Yes | No | Operator |
On a Bedrock server, /permission can also be typed /ops. It reloads the permissions.json file.
/whitelist and /allowlist
Manage the list of allowed players. On Bedrock, /whitelist is another name for /allowlist.
| Command | Effect |
|---|---|
/whitelist on | Turns the whitelist on |
/whitelist off | Turns it off |
/whitelist add Steve | Allows Steve |
/whitelist remove Steve | Removes Steve |
/whitelist list | Shows the list |
/whitelist reload | Reloads the list from the file |
Since Java 26.3, the white-list line of a new server.properties file is true. If your friends are turned away from a freshly created server, add them with /whitelist add or set that line to false.
Communication commands
These Minecraft commands send messages and titles.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/say | Public message | /say Welcome! | Yes | Yes | Operator |
/tell | Private message | /tell Steve Hi | Yes | Yes | Everyone |
/msg | Alias of /tell | /msg Steve Hello | Yes | Yes | Everyone |
/w | Alias of /tell | /w Steve Hi | Yes | Yes | Everyone |
/me | Action message | /me dances | Yes | Yes | Everyone |
/teammsg | Team message | /teammsg Let's attack! | Yes | No | Everyone |
/tm | Alias of /teammsg | /tm Ready? | Yes | No | Everyone |
/tellraw | JSON message | /tellraw @a {"text":"Hi"} | Yes | Yes | Operator |
/title | On-screen title | /title @a title "Victory" | Yes | Yes | Operator |
/titleraw | JSON title | /titleraw @a title {"rawtext":[{"text":"Victory"}]} | No | Yes | Operator |
/dialog | Shows a dialog box (Java 1.21.6) | /dialog show @p minecraft:server_links | Yes | No | Operator |
/help | Command help | /help gamemode | Yes | Yes | Everyone |
/title, show a title
Shows large text in the middle of the screen.
/title <target> <title|subtitle|actionbar> <text>
/title <target> times <fadeIn> <stay> <fadeOut>
/title <target> clear
| Command | Effect |
|---|---|
/title @a title "Welcome" | Main title |
/title @a subtitle "Have fun" | Subtitle |
/title @a actionbar "Score: 100" | Action bar, above the hotbar |
/title @a times 20 60 20 | Durations in ticks |
With JSON formatting (Java):
/title @a title {"text":"VICTORY","color":"gold","bold":true}
/tellraw, formatted message
Sends a formatted message, with colors and click actions.
/tellraw <target> <json>
| Property | Values |
|---|---|
text | The text to show |
color | red, green, blue, gold, etc. |
bold | true / false |
italic | true / false |
underlined | true / false |
click_event | Click action (Java 1.21.5 and later, clickEvent before) |
Java 1.21.5 and later:
/tellraw @a {"text":"Click here","color":"green","click_event":{"action":"run_command","command":"/tp @s 0 100 0"}}
Java 1.21.4 and earlier:
/tellraw @a {"text":"Click here","color":"green","clickEvent":{"action":"run_command","value":"/tp @s 0 100 0"}}
Bedrock:
/tellraw @a {"rawtext":[{"text":"§aClick here"}]}
On Bedrock, the text goes into a rawtext array. Colors use § codes, and click actions do not exist.
Scoreboard commands and objectives
These Minecraft commands keep score and organize teams.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/scoreboard | Manages scores | /scoreboard objectives add deaths deathCount | Yes | Yes | Operator |
/team | Manages teams | /team add Red | Yes | No | Operator |
/trigger | Objective players can trigger | /trigger my_objective add 1 | Yes | No | Everyone |
/advancement | Advancements | /advancement grant @p everything | Yes | No | Operator |
/recipe | Recipes | /recipe give @p * | Yes | Yes | Operator |
/scoreboard, the score system
Objectives:
/scoreboard objectives add <name> <criteria> [displayName]
/scoreboard objectives remove <name>
/scoreboard objectives setdisplay <slot> <objective>
| Criteria | Description |
|---|---|
dummy | Changed by commands only |
deathCount | Number of deaths |
playerKillCount | Players killed |
totalKillCount | Entities killed |
health | Health points |
xp | Experience points |
level | Experience level |
Criteria other than dummy are Java only. Bedrock only knows dummy.
Players:
/scoreboard players set <player> <objective> <score>
/scoreboard players add <player> <objective> <value>
/scoreboard players remove <player> <objective> <value>
/scoreboard players reset <player>
Full example (Java):
/scoreboard objectives add Kills playerKillCount "Kills"
/scoreboard objectives setdisplay sidebar Kills
/scoreboard players set Steve Kills 10
/team, teams (Java)
/team add <name> [displayName]
/team remove <name>
/team join <team> <players>
/team leave <players>
/team modify <team> <option> <value>
| Option | Values |
|---|---|
color | red, blue, green, etc. |
friendlyFire | true / false |
seeFriendlyInvisibles | true / false |
nametagVisibility | always, never, hideForOtherTeams, hideForOwnTeam |
collisionRule | always, never, pushOtherTeams, pushOwnTeam |
Example:
/team add Red
/team modify Red color red
/team join Red Steve Alex
Advanced technical commands
Minecraft commands for map makers and advanced admins.
| Command | Description | Example | Java | Bedrock | Access |
|---|---|---|---|---|---|
/execute | Conditional execution | /execute as @a run say Hi | Yes | Yes | Operator |
/function | Runs a function | /function namespace:file | Yes | Yes | Operator |
/schedule | Schedules a function | /schedule function pack:end 10s | Yes | Yes | Operator |
/return | Ends a function and returns a value (Java 1.20) | /return 1 | Yes | No | Operator |
/random | Draws a random number (Java 1.20.2) | /random roll 1..6 | Yes | No | Everyone |
/data | Reads and edits NBT | /data get entity @p | Yes | No | Operator |
/datapack | Manages data packs | /datapack list | Yes | No | Operator |
/reload | Reloads data packs and functions | /reload | Yes | Yes | Operator |
/seed | Shows the world seed | /seed | Yes | No | Everyone in single player, operator on a server |
/debug | Debug session | /debug start | Yes | No | Operator |
/perf | Measures performance | /perf start | Yes | No | Operator |
/jfr | Java Flight Recorder profiling | /jfr start | Yes | No | Operator |
/publish | Opens the world to LAN | /publish | Yes | No | Operator |
/unpublish | Closes LAN (Java 26.2) | /unpublish | Yes | No | Operator |
/particle | Creates particles | /particle minecraft:heart ~ ~2 ~ | Yes | Yes | Operator |
/playsound | Plays a sound | /playsound minecraft:entity.experience_orb.pickup master @p | Yes | Yes | Operator |
/stopsound | Stops a sound | /stopsound @a | Yes | Yes | Operator |
/music | Controls the music | /music play record.cat | No | Yes | Operator |
/camerashake | Shakes the camera | /camerashake add @p 1 5 | No | Yes | Operator |
/camera | Moves the camera, screen fade | /camera @p fade time 1 2 1 | No | Yes | Operator |
/playanimation | Plays an animation | /playanimation @e[type=villager] animation.villager.general | No | Yes | Operator |
/execute, the most powerful
Runs a command under conditions, as another entity or at another place. Java and Bedrock have shared this syntax since Bedrock 1.19.50.
/execute <subcommands> run <command>
| Subcommand | Effect |
|---|---|
as <entity> | Runs as the entity |
at <entity> | Runs at the entity's position |
positioned <x y z> | Runs at that position |
if block <x y z> <block> | If that block is there |
if entity <target> | If the entity exists |
if score <target> <obj> ... | If the score matches |
unless ... | The opposite of if |
store result ... | Stores the result (Java) |
Examples
/execute as @e[type=zombie] at @s run summon lightning_bolt ~ ~ ~
/execute if block ~ ~-1 ~ diamond_block run say Diamond!
/execute as @a at @s if block ~ ~-1 ~ lava run kill @s
/execute positioned 0 100 0 run summon tnt
/data, edit NBT (Java)
Reads and changes the NBT data of blocks and entities.
/data get <block|entity> <target> [path]
/data merge <block|entity> <target> <nbt>
/data modify <block|entity> <target> <path> <operation> ...
/data remove <block|entity> <target> <path>
Examples
/data get entity @p Inventory
/data merge entity @e[type=creeper,limit=1] {Fuse:0}
/data modify entity @e[type=item,limit=1,sort=nearest] Item.count set value 64
A player's data can be read but not changed with /data. For their inventory, use /item or /give.
/function, functions
Runs a .mcfunction file from a data pack, or from a behavior pack in Bedrock.
/function <namespace>:<path>
Example:
/function mypack:setup/init
/function minecraft:tick
/schedule, delayed execution
Schedules a function for later.
/schedule function <function> <time> [append|replace]
/schedule clear <function>
| Time | Equivalent |
|---|---|
10t | 10 ticks, half of 1s |
5s | 100 ticks |
1d | One game day, 24,000 ticks |
These suffixes are the Java ones. In Bedrock, /schedule mainly runs a function once an area is loaded (/schedule on_area_loaded).
Other commands
These commands complete the list. They are mostly used by Bedrock content creators and on Bedrock dedicated servers.
| Command | Edition | Purpose |
|---|---|---|
/experience | Java | Long form of /xp |
/alwaysday | Bedrock | Alias of /daylock |
/? | Bedrock | Alias of /help |
/inputpermission | Bedrock | Blocks or restores a player's movement controls |
/controlscheme | Bedrock | Switches the control scheme |
/aimassist | Bedrock, experimental | Sets aim assist |
/dialogue | Bedrock | Opens an NPC dialogue |
/scriptevent | Bedrock | Triggers a script event |
/script | Bedrock | Script debugging |
/worldbuilder / /wb | Bedrock | Allows editing restricted blocks |
/wsserver / /connect | Bedrock | Connects to a WebSocket server |
/dedicatedwsserver | Bedrock, dedicated server | Server WebSocket connection |
/changesetting | Bedrock, dedicated server | Changes a server setting |
/reloadconfig | Bedrock, dedicated server | Reloads configuration files |
/reloadpacketlimitconfig | Bedrock, dedicated server | Reloads the packet limit settings |
/gametest | Bedrock, dedicated server | GameTest tools |
/editor-allowlist | Bedrock, dedicated server | Editor allowlist |
/project | Bedrock, dedicated server | Manages Editor projects |
/party | Bedrock | Party chat message |
/sendshowstoreoffer | Bedrock | Shows a store offer |
Commands added since 2023
Mojang has numbered versions by year since 2026: after 1.21.11 came 26.1, 26.2 and 26.3. Here are the commands added since 1.20.
| Command | Edition and version | Purpose |
|---|---|---|
/return | Java 1.20 | Ends a function and returns a value |
/random | Java 1.20.2 | Draws a random number |
/tick | Java 1.20.3 | Freezes, speeds up or measures the game |
/transfer | Java 1.20.5, Bedrock 1.20.30 | Sends a player to another server |
/rotate | Java 1.21.2 | Turns an entity |
/test | Java 1.21.5 | Runs game tests (GameTest) |
/version | Java 1.21.6 | Shows the server version |
/waypoint | Java 1.21.6 | Manages locator bar waypoints |
/dialog | Java 1.21.6 | Shows a dialog box |
/fetchprofile | Java 1.21.9 | Fetches a player's profile |
/stopwatch | Java 1.21.11 | Real-time stopwatches |
/swing | Java 26.1 | Swings an entity's arm |
/unpublish | Java 26.2 | Closes the world to LAN |
/posteffect | Java 26.3 | Adds or removes a post effect |
/compute | Java 26.3 | Computes a value (number provider) |
/camera | Bedrock 1.20.0 | Controls the camera |
/recipe | Bedrock 1.20.10 | Gives or takes recipes |
/hud | Bedrock 1.20.60 | Hides or shows HUD elements |
/gametips | Bedrock 1.20.80 | Turns game tips on or off |
/set_movement_authority | Bedrock 1.21.50 | Sets movement checks |
/place | Bedrock 1.21.50 à 1.21.80 | Places structures, out of experiments in 1.21.80 |
Obsolete Minecraft commands
These commands were removed or replaced. Old tutorials still mention them.
| Old command | Removed in | Replaced by |
|---|---|---|
/testfor | Java 1.13 | /execute if entity |
/testforblock | Java 1.13 | /execute if block |
/testforblocks | Java 1.13 | /execute if blocks |
/blockdata | Java 1.13 | /data merge block |
/entitydata | Java 1.13 | /data merge entity |
/replaceitem | Java 1.17 | /item replace |
/achievement | Java 1.12 | /advancement |
/toggledownfall | Java 1.13 | /weather |
/stats | Java 1.13 | /execute store |
/locatebiome | Java 1.19 | /locate biome |
/placefeature | Java 1.19 | /place feature |
/opreload | Bedrock | /permission reload |
/volumearea | Bedrock 1.21.20 | none |
/testfor, /testforblock, /testforblocks, /replaceitem and /toggledownfall still exist in Bedrock.
Game rules renamed in Java 1.21.11
A /gamerule command copied from an old tutorial often fails because of these new names. The most common ones:
| Old name | Name in Java 26.3 |
|---|---|
doDaylightCycle | advance_time |
doWeatherCycle | advance_weather |
doMobSpawning | spawn_mobs |
doInsomnia | spawn_phantoms |
doMobLoot | mob_drops |
doTileDrops | block_drops |
naturalRegeneration | natural_health_regeneration |
spawnRadius | respawn_radius |
announceAdvancements | show_advancement_messages |
disableRaids | raids (inverted value) |
doFireTick | removed, replaced by fire_spread_radius_around_player |
The full list is in the guide to Minecraft gamerules.
The most searched commands
Short answers to the most frequent questions, for each edition.
| Need | Java | Bedrock |
|---|---|---|
| Keep your inventory | /gamerule keep_inventory true | /gamerule keepinventory true |
| Switch to creative | /gamemode creative | /gamemode creative |
| Teleport | /tp Steve 100 64 200 | /tp Steve 100 64 200 |
| Make it day | /time set day | /time set day |
| Stop the rain | /weather clear | /weather clear |
| Lock daytime | /gamerule advance_time false | /daylock true |
| Get items | /give @p diamond 64 | /give @p diamond 64 |
| Spawn a mob | /summon minecraft:wither | /summon wither |
| Find a village | /locate structure #village | /locate structure village |
| Show coordinates | F3 key | /gamerule showcoordinates true |
| Give a player operator rights | op Steve | op Steve |
The last line is typed in the server console, without a slash. For Bedrock-specific commands, the guide Minecraft Bedrock commands goes further.
Need help?
Open a ticket from Tickets › Open a Ticket, or from the Contact support tile at the bottom of your server's page in the client area. You can also ask your question on the OuiHeberg Discord.
Discover our Minecraft hosting plans starting from $2.28/month with automatic mod installation.
Minecraft server hosting →