Commands/spawnpoint

Sets the spawn point for a player.


 * Syntax


 * Java Edition


 * Pocket Edition


 * Arguments


 * player (PE: player: target) (optional)
 * Specifies the player whose spawn point should be set. Must be a player name or a target selector. If not specified, defaults to the command's user. Not optional in command blocks.


 * x y z (PE: spawnPos: x y z) (optional)
 * Specifies the coordinates of the player's new spawn point. x and z must be integers within the range -30,000,000 to 30,000,000 (inclusive). y must be an integer between 0 and 256 (inclusive). May use tilde notation to specify coordinates relative to the command's execution. If not specified, defaults to the position of the specified player(s).


 * Result


 * Fails if the arguments are not specified correctly, or if player fails to resolve to one or more online players.


 * On success, sets the spawn point of the targeted player(s) to the specified coordinate.