Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/setworldspawn

Command

/setworldspawn

Sets the world spawn point, where new players appear and where players respawn when they have no spawn point of their own.

Syntax

/setworldspawn [<pos> [<rotation>]]

Arguments

ArgumentKind of valueWhat to type
<pos>Block positionThe block position of the new world spawn. Defaults to the position the command is run from.
<rotation>RotationThe direction players face at the world spawn, as yaw and pitch. Defaults to 0 0.

Details

Permission level2: operators, worlds with cheats on, command blocks and functions
Works inSingleplayer with cheats enabled, multiplayer servers, command blocks and functions. Needs permission level 2 (gamemasters): operators, players in a world with cheats enabled, command blocks and functions.
ResultReports the new world spawn point with its coordinates, facing direction and dimension. The number /execute store saves is 1.
No argumentsWithout a position, the block the command is run from is used and the facing direction is set to 0 0.
DimensionThe world spawn is set in the dimension the command is run in. Use /execute in to choose another dimension.
RotationThe rotation is two numbers: yaw (left and right) and pitch (up and down). It is the direction players face when they appear. Without it the direction is 0 0.
Position limitsThe position must be within 30,000,000 blocks of the center horizontally and between Y -20,000,000 and Y 20,000,000, otherwise the command fails with "That position is outside the allowed boundaries".

Examples

/setworldspawn

Sets the world spawn to where you are standing.

/setworldspawn 0 64 0

Sets the world spawn to the coordinates 0, 64, 0.

/setworldspawn ~ ~ ~

Sets the world spawn to your current block position.

/setworldspawn 100 70 -50 90 0

Sets the world spawn to 100, 70, -50 with players facing yaw 90 and pitch 0.

/setworldspawn ~ ~ ~ ~ ~

Sets the world spawn to your position and the direction you are looking in.

/setworldspawn ~ 100 ~

Sets the world spawn to your X and Z position at Y 100.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)