The Gamepedia and Fandom account systems have now been merged. If your username is incorrect, you have accounts on both platforms that weren't merged, or you have trouble signing in, please submit a support ticket.

Commands/setworldspawn

From Minecraft Wiki
Jump to: navigation, search
setworldspawn
Restrictions

Operator

First introduced

Java Edition 1.7.2 (13w43a)
PE Alpha 0.16.0 (PE Alpha 0.16.0 build 1)

Sets the world spawn.

Syntax[edit]

  • Java Edition
setworldspawn [<pos>]
setworldspawn [<pos>] [<angle>][upcoming: JE 1.16.2]
  • Bedrock Edition
setworldspawn [spawnPoint: x y z]

Arguments[edit]

<pos> (BE: spawnPoint: x y z) (optional)

Specifies the coordinates of the world spawn. x and z must be within the range −30,000,000 to 30,000,000 (inclusive). y must be between 0 and 256 (inclusive). May use tilde and caret notation to specify coordinates relative to the command's execution. If not specified, defaults to the block position of the command's execution.
If the server is not in adventure mode, players always spawn on the topmost block near (x,z) — y is effectively ignored. If the server is in adventure mode, then the new spawnpoint is exactly at the given coordinates, including the y coordinate (even if underground and even if there isn't a block there) — if the y level given does not have space for the player then the spawnpoint moves up on the y axis until it does, at most y level 256.

<angle>[upcoming: JE 1.16.2] (optional)

Floating point yaw angle in degrees. Supports the relative tilde notation, which defaults to the direction the executing player is facing.

Result[edit]

Fails if the arguments are not specified correctly.

On success, sets the world spawn to the specified coordinate, and spawn chunks are also changed along with the world spawn in Java Edition.

Normal spawn spreading still applies, and can be set with a gamerule.

History[edit]

Java Edition
1.7.213w43aAdded /setworldspawn.
Upcoming Java Edition
1.16.220w29aAdded angle parameter for setting the default facing angle of a respawning player.
Pocket Edition Alpha
0.16.0build 1Added /setworldspawn.

See also[edit]