![]() |
VOOZH | about |
/setworldspawn| Permission level required |
|
|---|---|
| Restrictions | Cheat only[BE only] |
{
"title": "<code>/setworldspawn</code>",
"rows": [
{
"field": "\n* 2 <sup class=\" nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup>\n* 1 <sup class=\" nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "(link to Cheat article, displayed as Cheat) only<sup class=\" nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Sets the world spawn.
In Java Edition, this command can be used to set the world spawn in any dimension other than the Overworld.
Normal spawn spreading still applies, and can be set with a gamerule.
setworldspawn [<pos>] [<angle>]setworldspawn [spawnPoint: x y z]JE: <pos>: block_pos
BE: spawnPoint: x y z: CommandPositionFloat
<x> and <z> should be in the range of [-30000000, 30000000), and <y> should be in the range of [-20000000, 20000000).<x> and <z> that are greater than 30,000,000 or less than -30,000,000 are reverted to 30,000,000 and -30,000,000 respectively; <y> values which are greater than 319 and less than -64 are reverted to 319 and -64 respectively.<X>, <Y> and <Z>, each of which must be an integer or a tilde and caret notation.| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable | Unparseable |
| The execution dimension is not the Overworld. | Successful | Failed | |
| The <x> or <z> exceed the range of [-30000000, 30000000), or the <y> argument exceeds the range of [-20000000, 20000000). | Failed | Successful | |
| Otherwise | Successful | ||
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | 0 | 0 | 0 |
| On success | 1 | 1 | 1 | ||
| Bedrock Edition | On fail | 0 | N/A | N/A | |
| On success | 1 | N/A | N/A |
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.7.2 | 13w43a | Added /setworldspawn. | |||||
| 1.16.2 | 20w29a | Added angle parameter for setting the default facing angle of a respawning player. | |||||
| 1.17 | 21w10a | Now /setworldspawn does not accept positions where <x> or <z> exceeds the range of [-30000000, 30000000), or <y> exceeds the range of [-20000000, 20000000)[1] | |||||
| 1.20.5 | 24w03a | Now /setworldspawn success only in the Overworld. Before, if executed in another dimension, the command acts as if it succeeded, but the world spawn is not changed. | |||||
| 1.21.9 | 25w31a | Spawn chunks have been removed, which until now were moved when /setworldspawn was used. | |||||
| Pre-Release 1 | /setworldspawn can now be used to set spawn point to another dimension than Overworld. | ||||||
It now also takes in an optional pitch argument. | |||||||
| Pocket Edition Alpha | |||||||
|---|---|---|---|---|---|---|---|
| v0.16.0 | build 1 | Added /setworldspawn. | |||||
/setworldspawn Command" – Microsoft Learn, October 11, 2023.