/spawnpoint

Jump to navigation Jump to search
/spawnpoint
Permission level
required
  • 2 ‌[JE only]
  • 1 ‌[BE only]
Restrictions

Cheat only‌[BE only]

This command sets the spawn point for a player.

In Java Edition, this command works in any dimension and can set the player's spawn point into any dimension.[note 1] In Bedrock Edition, this command can only be used in the overworld and the nether.

Syntax[edit | edit source]

  • Java Edition
spawnpoint [<targets>] [<pos>] [<angle>]
  • Bedrock Edition
spawnpoint [player: target] [spawnPos: x y z]

Arguments[edit | edit source]

JE<targets>: entity
BE: player: target: CommandSelector<Player>

Specifies the player whose spawn point should be set. If not specified, defaults to the command's executor.
Must be a player name, a target selector or a UUID[Java Edition only]. And the target selector must‌[JE only]/should‌[BE only] be of player type. In Bedrock Edition, the target selector should be of player type.

JE<pos>: block_pos
BE: spawnPos: x y z: CommandPositionFloat

Specifies the coordinates of the player's new spawn point. If not specified, defaults to the position of the specified player(s) in Bedrock Edition or the command's execution in Java Edition.
In Java Edition, <x> and <z> should be in the range of [-30000000, 30000000), and <y> should be in the range of [-20000000, 20000000).
In Bedrock Edition, <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.
In Java Edition:
Must be a block position composed of <X>, <Y> and <Z>, each of which must be an integer or a tilde and caret notation.
In Bedrock Edition:
Must be three-dimensional coordinates with single-precision floating-point number elements. Accepts tilde and caret notations.

JE: <angle>: angle

Specifies the yaw angle to spawn with. Defaults to the direction the executor is facing.
Must be a yaw angle, measured in degrees with single-precision floating-point numbers. -180.0 for due north, -90.0 for due east, 0.0 for due south, 90.0 for due west, to 179.9 for just west of due north, before wrapping back around to -180.0. Tilde notation can be used to specify a rotation relative to the execution yaw rotation.

Result[edit | edit source]

CommandTriggerJava EditionBedrock Edition
AnyThe command is incomplete, or any argument is not specified correctly. Unparseable Unparseable
player: target is a target selector that not in player type. N/A Failed
<targets> or player: target fails to resolve to one or more online players. Failed
<targets> or player: target is not specified, and the command's executor is not a player.
The <x> or <z> exceed the range of [-30000000, 30000000), or the <y> argument exceeds the range of [-20000000, 20000000). Successful
OtherwiseSuccessful

Output[edit | edit source]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
AnyJava EditionOn fail000
On success11the number of players whose spawnpoints are set
Bedrock EditionOn fail0N/AN/A
On successthe number of players whose spawnpoints are setN/AN/A

History[edit | edit source]

[hide]Java Edition
1.4.212w32aAdded /spawnpoint.
1.1620w12aAdded support for being run in any dimension.
1.16.220w29aAdded angle parameter for setting the default facing angle of a respawning player.
1.1721w10a/setworldspawn now cannot teleport an entity to a position where <x> or <z> exceeds the range of [-30000000, 30000000), or <y> exceeds the range of [-20000000, 20000000).[1]
[hide]Pocket Edition Alpha
v0.16.0build 1Added /spawnpoint.
[hide]Bedrock Edition
1.16.0beta 1.16.0.57/spawnpoint can now be used in the Nether.

See also[edit | edit source]

Notes[edit | edit source]

  1. You will have to be in the dimension you want to set your spawn in. Alternatively, you can use /execute at <dimension> run spawnpoint ... to set your spawn in a dimension without being there.

References[edit | edit source]

  1. MC-210408 — resolved as "fixed".

Navigation[edit | edit source]