View at: Template:Commands/content [edit]
Commands/spawnpoint - minecraft.fandom.com
Treść tej podstrony pochodzi z artykułu „Commands/spawnpoint” w domenie minecraft.fandom.com na licencji CC BY-NC-SA 3.0
Sets the spawn point for a player, works in all dimensions.
Syntax[]
- Java Edition
spawnpoint [<targets>] [<pos>] [<angle>]
- Bedrock Edition
spawnpoint [player: target] [spawnPos: x y z]
Arguments[]
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.
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, 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 a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.
- Specifies the yaw angle to spawn with. Defaults to the direction the executor is facing.
- 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 execution yaw angle.
Result[]
| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| any | the arguments are not specified correctly | Unparseable | Unparseable |
player: target is 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 | |||
| Otherwise | Successful | ||
Output[]
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| any | Java Edition | On fail | 0 | 0 | 0 |
| On success | 1 | 1 | the number of players whose spawnpoints are set | ||
| Bedrock Edition | On fail | 0 | N/A | N/A | |
| On success | the number of players whose spawnpoints are set | N/A | N/A |
History[]
| Java Edition | |||||
|---|---|---|---|---|---|
| 1.4.2 | 12w32a | Added /spawnpoint. | |||
| 1.16 | 20w12a | Added support for being run in any dimension. | |||
| 1.16.2 | 20w29a | Added angle parameter for setting the default facing angle of a respawning player. | |||
| Pocket Edition Alpha | |||||
| v0.16.0 | build 1 | Added /spawnpoint. | |||