Minecraft Commands
Minecraft Java Edition commands for players, worlds and servers.
18 Commands found
No commands found. Try a different search or filter.
-
Information Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Broadcast a test message
Enter this example in player chat. Broadcasts Library test to all online players, with an announcement identifying the sender. It is plain message text, not an SNBT text component. Use a separate test world or warn other players before sending.
/say Library testPermissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Enter this example in player chat. The message reaches all online players and identifies the sender; inform other players before broadcasting.
- Source
- https://minecraft.wiki/w/Commands/say (opens in a new tab)
- Source checked on
-
Information Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Send yourself a formatted chat message
Enter this example in player chat. Sends Library test in gold only to you: @s selects the executing player. The message uses Java's current SNBT text-component syntax, not Bedrock's rawtext structure. A command block or server console has no player entity of its own, so do not copy this @s target unchanged into those contexts.
/tellraw @s {text:"Library test",color:gold}Permissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition, even when sending only to yourself. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Run this example in player chat: @s selects you. A command block or server console has no player entity of its own, so the target must be adapted for those contexts.
- Source
- https://minecraft.wiki/w/Commands/tellraw (opens in a new tab)
- Source checked on
-
Information Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Show command help
Lists available commands in the ingame chat so you can look up what you can use.
/helpPermissions / Source
- Permissions
- Requires permission level 0 in Java Edition; operator status and enabling commands in single-player are not required. Enter this example in player chat. Help only shows commands available to you with your current permissions.
- Source
- https://minecraft.wiki/w/Commands/help (opens in a new tab)
- Source checked on
-
Information Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Show yourself an actionbar message
Enter this example in player chat. Shows Library test in gold above your hotbar, rather than as a large central title. @s selects you. Java's title command takes an SNBT text component here; do not replace it with Bedrock's titleraw command. Other actionbar messages can overwrite this temporary display.
/title @s actionbar {text:"Library test",color:gold}Permissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Run this example in player chat: @s selects you. A command block or server console needs an explicit player target instead. Other actionbar messages can replace this display.
- Source
- https://minecraft.wiki/w/Commands/title (opens in a new tab)
- Source checked on
-
Items Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Give yourself one stone block
Gives your player one stone block. Run this example as a player in the ingame chat and leave room in your inventory. If there is not enough space, the item may be dropped into the world instead of being added to your inventory.
/give @s minecraft:stone 1Permissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Run this example in player chat: @s selects you. A command block or server console needs an explicit player target instead. Leave inventory space free; excess items may be dropped into the world.
- Source
- https://minecraft.wiki/w/Commands/give (opens in a new tab)
- Source checked on
-
Players Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Add a demo tag to yourself
Enter this example in player chat. Adds the persistent entity tag dj_demo to you, selected by @s. Use a separate test world and first ensure this tag is not already used by another system. Adding an existing tag does not add a second copy. To undo this demonstration, enter /tag @s remove dj_demo in player chat; remove it only if you added it for this test.
/tag @s add dj_demoPermissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Run this example in player chat: @s selects you. A command block or server console needs an explicit entity target instead. Tags persist; do not remove a tag used by another system.
- Source
- https://minecraft.wiki/w/Commands/tag (opens in a new tab)
- Source checked on
-
Players Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Play a quiet note-block sound for yourself
Enter this example in player chat. Targets only you with @s and plays the Java sound event minecraft:block.note_block.pling at your execution position (~ ~ ~), using the master category, volume 0.5 and pitch 1. The event ID is not a sound-file path. Audible output depends on client volume settings and resource packs. In other execution contexts the position can differ from the listener's position; selecting a player alone does not guarantee that the sound is within hearing range.
/playsound minecraft:block.note_block.pling master @s ~ ~ ~ 0.5 1Permissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition, even when playing sound only to yourself. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Run this example in player chat: @s selects you and ~ ~ ~ uses your execution position. In a command block or server console, adapt both target and position. Hearing the sound also depends on distance, client volume settings and resource packs.
- Source
- https://minecraft.wiki/w/Commands/playsound (opens in a new tab)
- Source checked on
-
Players Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Switch yourself to Creative mode
Changes your own game mode to Creative. Run this example as a player in the ingame chat; it changes how you interact with the world.
/gamemode creative @sPermissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Run this example in player chat: @s selects you. A command block or server console has no player entity of its own, so the target must be adapted for those contexts.
- Source
- https://minecraft.wiki/w/Commands/gamemode (opens in a new tab)
- Source checked on
-
Server Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Server console
Request a server save
Requests a normal save of the server's world data. Enter this example directly in the Minecraft server console without a leading slash. Unlike save-all flush, it does not request immediate writing of all player and chunk data to storage; flush can briefly pause the server. Neither variant creates a separate backup, and this example does not stop the server.
save-allPermissions / Source
- Permissions
- Requires permission level 4 on a dedicated Java server. Enter this example without a leading slash in the Minecraft server console, not an operating-system shell; authorized console access is required, but no player needs to be logged in as an operator. Player-chat use requires operator level 4. Command blocks run at level 2 and cannot run save-all. A world save is not a separate backup.
- Source
- https://minecraft.wiki/w/Commands/save-all (opens in a new tab)
- Source checked on
-
Travel Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Find a nearby stronghold
Searches for a stronghold and reports its location. Enter this example in player chat in the Overworld. The command does not teleport you. Finding a structure is not a guarantee of a safe destination; do not teleport to the reported coordinates without checking the surroundings.
/locate structure minecraft:strongholdPermissions / Source
- Permissions
- Allow commands in your single-player world. On a server, ask the administrator whether you have permission to use locate. Enter this example in player chat in the Overworld.
- Source
- https://www.minecraft.net/en-us/article/minecraft-commands (opens in a new tab)
- Source checked on
-
Travel Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Teleport yourself one block up
Moves you one block above your current position without changing the horizontal coordinates. Run this example as a player in the ingame chat. Check that the destination is clear; the destination may be unsafe and the command does not guarantee a safe landing.
/teleport @s ~ ~1 ~Permissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Run this example in player chat: @s selects you and the relative coordinates use your execution position. In a command block or server console, both target and position need attention. Check that the destination is safe.
- Source
- https://minecraft.wiki/w/Commands/teleport (opens in a new tab)
- Source checked on
-
World Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Advance the Overworld clock to day
Run this example as a player in the ingame chat in the Overworld. Without an explicit clock, the command uses the execution dimension's default world clock. In the Overworld, it advances that clock to the next occurrence of the day time marker. It neither pauses the clock nor automatically resumes a paused clock.
/time set dayPermissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Run this example in player chat in the Overworld. Without an explicit clock, the execution dimension determines the default world clock. Inform other players before changing shared time; setting the time does not resume a paused clock.
- Source
- https://www.minecraft.net/en-us/article/minecraft-java-edition-26-1 (opens in a new tab)
- Source checked on
-
World Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
List existing scoreboard objectives
Enter this example in player chat. Lists existing scoreboard objectives without creating an objective, changing scores or changing a display slot. No setup is required. If there are no objectives, the output reports that state; this is not a list of online players or their individual scores.
/scoreboard objectives listPermissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition, including for this read-only query. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Enter this example in player chat. Listing objectives does not change scores or display settings.
- Source
- https://minecraft.wiki/w/Commands/scoreboard (opens in a new tab)
- Source checked on
-
World Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Request clear weather for 60 seconds
Enter this example in player chat, preferably in the Overworld of a separate test world where weather is easy to observe. Requests clear weather for 60 seconds of game time (1200 ticks at 20 ticks per second), replacing the current weather timing. This does not guarantee exactly 60 seconds of wall-clock time under lag. Java also allows execution outside the Overworld; visible weather depends on the dimension and biome. Warn other players before changing shared weather.
/weather clear 60sPermissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Enter this example in player chat, preferably in the Overworld. Inform other players before changing shared weather; visible effects depend on dimension and biome.
- Source
- https://minecraft.wiki/w/Commands/weather (opens in a new tab)
- Source checked on
-
World Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Run one message for each online player
Enter this example in player chat in a separate test world. as @a creates one execution branch per online player and makes that player the executing entity. at @s then uses that player's position, rotation and dimension; as alone would not move the execution point. run tellraw @s sends each selected player one green Library test message using an SNBT text component. The message itself does not depend on position, but the explicit at step demonstrates the context for later positional commands. Warn other players before testing.
/execute as @a at @s run tellraw @s {text:"Library test",color:green}Permissions / Source
- Permissions
- Requires permission level 2 or higher in Java Edition for both execute and the nested tellraw command. Enable commands in single-player; on a Vanilla server, you need operator permissions at level 2 or higher. Enter this example in player chat. as changes the executing entity, not the command source's permission level, and does not grant operator status. @a selects all online players; inform them before sending messages.
- Source
- https://minecraft.wiki/w/Commands/execute (opens in a new tab)
- Source checked on
-
World Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Set the world difficulty to Easy
Sets the world's difficulty to Easy. Enter this example in player chat. This is a change, not a read-only query. Record the previous difficulty before trying it and use a separate test world rather than changing an active shared world.
/difficulty easyPermissions / Source
- Permissions
- Allow commands in your single-player world. On a server, ask the administrator whether you have permission to change the difficulty. Enter this example in player chat in a separate test world. Changing difficulty affects the shared world, not only your player; obtain the administrator's approval and inform other players first.
- Source
- https://www.minecraft.net/en-us/article/minecraft-commands (opens in a new tab)
- Source checked on
-
World Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Set the world spawn at your location
Sets the world spawn point at your current location. Enter this example without coordinate arguments in player chat in the Overworld. The Overworld is the recommended test environment, not a technical restriction; other dimensions have also been supported since Minecraft Java 1.21.9. This changes the world's spawn setting; it does not teleport you. Use a separate test world and do not assume that every player will respawn at exactly these coordinates.
/setworldspawnPermissions / Source
- Permissions
- Allow commands in your single-player world. On a server, ask the administrator whether you have permission to change the world spawn. Enter this example in player chat in the Overworld of a separate test world. Choose a safe location and obtain approval before changing a shared world's spawn.
- Source
- https://www.minecraft.net/en-us/article/minecraft-commands (opens in a new tab)
- Source checked on
-
World Minecraft
- Edition
- Java Verified version: 26.3
- Execution context
- Ingame chat
Summon a zombie at your location
Summons one zombie at your current location. Enter this example in player chat. No coordinates or custom entity data are supplied. Since Minecraft Java 1.21.9, summoning hostile monsters such as zombies fails when the difficulty is set to Peaceful. Use a separate Creative test world with enough free space; this changes the world and can affect other players. A successful summon does not guarantee that the mob remains present under every world condition.
/summon minecraft:zombiePermissions / Source
- Permissions
- Allow commands in your single-player world. On a server, ask the administrator whether you have permission to use summon. Enter this example in player chat only in a separate Creative test world and inform other players first. It creates a hostile mob at your location.
- Source
- https://www.minecraft.net/en-us/article/minecraft-commands (opens in a new tab)
- Source checked on