Commands/setworldspawn

Sets the world spawn.

Syntax

 * Java Edition


 * Bedrock Edition

Arguments

 * Specifies the coordinates of the world spawn. If not specified, defaults to the block position of the command's execution. $$,  and   that are greater than 30,000,000 or less than -30,000,000 revert to 30,000,000 and -30,000,000 respectively.   values which are greater than 256 and less than 0 revert to 256 and 0 respectively.
 * Specifies the coordinates of the world spawn. If not specified, defaults to the block position of the command's execution. $$,  and   that are greater than 30,000,000 or less than -30,000,000 revert to 30,000,000 and -30,000,000 respectively.   values which are greater than 256 and less than 0 revert to 256 and 0 respectively.
 * Specifies the coordinates of the world spawn. If not specified, defaults to the block position of the command's execution. $$,  and   that are greater than 30,000,000 or less than -30,000,000 revert to 30,000,000 and -30,000,000 respectively.   values which are greater than 256 and less than 0 revert to 256 and 0 respectively.


 * Specified the yaw angle to spawn with. Defaults to the direction the executor is facing.
 * Specified the yaw angle to spawn with. Defaults to the direction the executor is facing.
 * Specified the yaw angle to spawn with. Defaults to the direction the executor is facing.

Note
On success, spawn chunks are also changed along with the world spawn $$.

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