Plain numbers are fixed block coordinates. ~ means where the command runs, ~10 means 10 blocks from it, and ^ values are local coordinates relative to the executor's facing.
Without an angle, players spawn with their default facing. Add one to point everyone at your build the moment they appear.
Plain numbers are absolute block coordinates; ~ resolves from wherever the command runs.
You need operator permission level 2: enable cheats in singleplayer or be opped on a server. World spawn always lives in the Overworld, even if the command runs in the Nether or the End, and the coordinates are rounded to whole blocks.
By default, players without a bed or personal spawn point respawn scattered up to 10 blocks around world spawn. Set the spawn radius to 0 to drop everyone exactly on the block you chose above.
Players without a personal spawn point respawn exactly on the world spawn block.
/setworldspawn moves the world spawn point: the spot where new players first appear and where anyone without a bed, respawn anchor or /spawnpoint respawns after dying. Run it bare to use the block you are standing on, or pass X Y Z coordinates and an optional facing direction.
Every world gets a spawn point chosen by the game when the world is created, and the Minecraft setworldspawn command is the only vanilla way to move it afterwards. It needs operator permission level 2: enable cheats when creating a singleplayer world, open it to LAN with cheats on, or be opped on a server. It also works from command blocks and functions, which is how adventure maps lock their start area in place.
The world spawn always sits in the Overworld. Running the command in the Nether or the End still moves the Overworld spawn to the coordinates you give, so always run it from the dimension the spawn actually lives in. Coordinates are rounded down to whole blocks, and a regular compass immediately starts pointing at the new location, which makes it easy to verify the change.
World spawn is also the center of spawn protection on servers: the spawn-protection radius in server.properties stops non-operators from breaking or placing blocks around it. Moving spawn moves that protected square with it.
The command has three reachable forms, all built by the generator above:
Yaw runs clockwise from south: 0 south, 90 west, 180 north, -90 east. Pitch is 0 for a level camera, -90 looking straight up and 90 straight down. Copy-ready examples:
/setworldspawnSets world spawn to the block you are standing on. The fastest way to move spawn to your base./setworldspawn 0 64 0Pins world spawn at exact coordinates, here the classic map origin at Y 64./setworldspawn ~ ~ ~ 90Spawn where the command runs, facing west. Single-angle form for 1.17 through 1.21./setworldspawn 250 70 -120 180 0Current rotation form: spawn at fixed coordinates facing north with a level camera./gamerule respawn_radius 0Companion command: stop the default 10-block respawn scatter so players appear exactly on the spawn block (use spawnRadius on 1.21 and older).Setting the spawn point is only half the job, because vanilla does not respawn players exactly on it. The spawn radius gamerule (respawn_radius on current versions, spawnRadius on 1.21 and older) defaults to 10, which scatters each respawning player somewhere in a roughly 20 by 20 block square centered on world spawn. The game then drops them on the highest open block it finds, so players can end up on a roof or in a tree next to your carefully chosen spot.
For an adventure map, a hub or any build where the arrival point matters, pair the two commands: /setworldspawn for the exact block and facing, then /gamerule respawn_radius 0 so the scatter disappears and every player lands on that block. The generator above produces both. A radius of 0 also means players spawn at the exact Y level you set rather than the highest block above it, which is what makes indoor and underground spawn rooms work.
Remember the priority order: a player's own /spawnpoint, bed or respawn anchor always wins over world spawn. World spawn is the fallback for first joins and for players whose bed was destroyed or obstructed, so on a public server it is effectively the front door of your map.
Stand where you want players to appear and run /setworldspawn with no arguments, or give exact coordinates such as /setworldspawn 0 64 0. You need operator permission level 2, which means enabling cheats in singleplayer or being opped on a server. The point you set becomes the spawn for new players and for anyone without a bed or personal spawn point.
The spawn radius gamerule scatters respawning players across a square up to 10 blocks from world spawn by default, and the game places each player on the highest open block it finds there. Run /gamerule respawn_radius 0 (the rule is called spawnRadius in 1.21 and older) and everyone respawns exactly on the spawn block instead.
/setworldspawn moves the global spawn that applies to the whole world, while /spawnpoint sets a personal spawn point for specific players. Personal spawn points, beds and respawn anchors all take priority over world spawn, so the world spawn only matters for players who have none of those, plus every player joining for the first time.
It sets the direction players face when they spawn. Yaw 0 faces south, 90 west, 180 north and -90 east, and ~ keeps the direction of whoever ran the command. Versions 1.17 through 1.21 accept a single yaw angle, while the current command takes yaw and pitch together so spawning players can also look up or down.
No. In Java Edition the world spawn always lives in the Overworld. Running /setworldspawn from another dimension still sets the Overworld spawn point at the coordinates you give, which is rarely what you want, so run the command while standing in the Overworld.
Yes. An ordinary compass always points at the current world spawn, so moving spawn with /setworldspawn instantly retargets every compass in the world. Only lodestone compasses are exempt because they track their lodestone instead. Checking a compass is the quickest way to confirm the command worked.
Need a per-player spawn instead? Or browse more Minecraft tools: