Commands/spawnpoint

From Minecraft Wiki
Jump to: navigation, search
spawnpoint
Restrictions

Operator

First introduced

Java Edition 1.4.2 (12w32a)
PE Alpha 0.16.0 (PE Alpha 0.16.0 build 1)

Sets the spawn point for a player. You can now set your spawnpoint in the Nether and End.

Syntax[edit]

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

Arguments[edit]

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

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

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

In Java Edition, it must be a block position composed of <x>, <y> and <z>, each of which must be an integer or tilde and caret notation.
In Bedrock Edition, must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.
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.

JE: <angle>: angle

Must be a yaw angle, measured in degrees with float number. -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 executor's yaw angle.
Specifies the yaw angle to spawn with. Defaults to the direction the executor is facing.

Result[edit]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Failed
if <targets> or player: target fails to resolve to one or more online players Failed
if <targets> or player: target is not specified and the command executor is not a player
On successSets the spawn point of the targeted player(s) to the specified coordinate.

Output[edit]

CommandEditionSituationSuccess Count/execute store succeess .../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]

Java Edition
1.4.212w32aAdded /spawnpoint.
1.16.220w29aAdded angle parameter for setting the default facing angle of a respawning player.
Pocket Edition Alpha
0.16.0build 1Added /spawnpoint.

See also[edit]