Minecraft:Commands/spawnpoint: Difference between revisions
More actions
Remove broken links to missing pages |
Fix template calls: add MC/ prefix |
||
| Line 17: | Line 17: | ||
== Arguments == | == Arguments == | ||
{{ | {{MC/Argument|targets|entity|player: target|CommandSelector<Player>}} | ||
: Specifies the player whose spawn point should be set. If not specified, defaults to the command's executor. | : Specifies the player whose spawn point should be set. If not specified, defaults to the command's executor. | ||
: {{ | : {{MC/Arg desc|je=entity|amount=multiple|type=players|be=player}} | ||
{{ | {{MC/Argument|pos|block_pos|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) {{ | : Specifies the coordinates of the player's new spawn point. If not specified, defaults to the position of the specified player(s) {{MC/In|bedrock}} or the command's execution {{MC/In|java}}. | ||
: {{ | : {{MC/In|java}}, <code><''x''></code> and <code><''z''></code> should be in the range of [-30000000, 30000000), and <code><''y''></code> should be in the range of [-20000000, 20000000). | ||
: {{ | : {{MC/In|bedrock}}, <code><''x''></code> and <code><''z''></code> that are greater than 30,000,000 or less than -30,000,000 are reverted to 30,000,000 and -30,000,000 respectively; <code><''y''></code> values which are greater than 319 and less than -64 are reverted to 319 and -64 respectively. | ||
: {{ | : {{MC/In|java}}: | ||
:: {{ | :: {{MC/Arg desc|je=block_pos}} | ||
: {{ | : {{MC/In|bedrock}}: | ||
:: {{ | :: {{MC/Arg desc|be=CommandPositionFloat}} | ||
{{ | {{MC/El|je|short=1}}: {{MC/Argument|angle|angle}} | ||
: Specifies the yaw angle to spawn with. Defaults to the direction the executor is facing. | : Specifies the yaw angle to spawn with. Defaults to the direction the executor is facing. | ||
: {{ | : {{MC/Arg desc|je=angle}} | ||
== Result == | == Result == | ||
| Line 47: | Line 47: | ||
== Output == | == Output == | ||
{{Output table}} | {{MC/Output table}} | ||
{{Output table|edition=je|On fail|0|0|0}} | {{MC/Output table|edition=je|On fail|0|0|0}} | ||
{{Output table|On success|1|1|the number of players whose spawnpoints are set}} | {{MC/Output table|On success|1|1|the number of players whose spawnpoints are set}} | ||
{{Output table|edition=be|On fail|0}} | {{MC/Output table|edition=be|On fail|0}} | ||
{{Output table|On success|the number of players whose spawnpoints are set}} | {{MC/Output table|On success|the number of players whose spawnpoints are set}} | ||
{{Output table}} | {{MC/Output table}} | ||
== History == | == History == | ||
=== ''Java Edition'' === | === ''Java Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|java}} | |{{MC/HistoryLine|java}} | ||
|{{HistoryLine||1.4.2|dev=12w32a|Added {{ | |{{HistoryLine||1.4.2|dev=12w32a|Added {{MC/Cmd|spawnpoint|link=none}}.}} | ||
|{{HistoryLine||1.16|dev=20w12a|Added support for being run in any dimension.}} | |{{MC/HistoryLine||1.16|dev=20w12a|Added support for being run in any dimension.}} | ||
|{{HistoryLine||1.16.2|dev=20w29a|Added {{ | |{{HistoryLine||1.16.2|dev=20w29a|Added {{MC/Cd|angle}} parameter for setting the default facing angle of a respawning player.}} | ||
|{{HistoryLine||1.17|dev=21w10a|{{ | |{{HistoryLine||1.17|dev=21w10a|{{MC/Cmd|setworldspawn|link=none}} 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).<ref>{{bug|MC-210408|||fixed}}</ref>}} | ||
|{{HistoryLine||1.21.9|dev=Pre-Release 1|The command now optionally takes in a pitch argument.}} | |{{MC/HistoryLine||1.21.9|dev=Pre-Release 1|The command now optionally takes in a pitch argument.}} | ||
}} | }} | ||
=== ''Bedrock Edition'' === | === ''Bedrock Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|pocket alpha}} | |{{MC/HistoryLine|pocket alpha}} | ||
|{{HistoryLine||v0.16.0|dev=build 1|Added {{ | |{{HistoryLine||v0.16.0|dev=build 1|Added {{MC/Cmd|spawnpoint|link=none}}.}} | ||
|{{HistoryLine|bedrock}} | |{{MC/HistoryLine|bedrock}} | ||
|{{HistoryLine||1.16.0|dev=beta 1.16.0.57|{{ | |{{HistoryLine||1.16.0|dev=beta 1.16.0.57|{{MC/Cmd|spawnpoint|link=none}} can now be used in the Nether.}} | ||
|{{HistoryLine||1.21.100|dev=Preview 1.21.100.20|{{ | |{{HistoryLine||1.21.100|dev=Preview 1.21.100.20|{{MC/Cmd|spawnpoint|link=none}} can now be used in the End.}} | ||
}} | }} | ||
== See also == | == See also == | ||
* {{ | * {{MC/Cmd|clearspawnpoint}} | ||
* {{ | * {{MC/Cmd|setworldspawn}} | ||
== Notes == | == Notes == | ||
| Line 89: | Line 89: | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{MC/Navbox commands}} | ||
de:Befehl/spawnpoint | de:Befehl/spawnpoint | ||
Latest revision as of 20:13, 9 April 2026
Template:Infobox command This command sets the spawn point for a player.
This command works in any Minecraft:dimension and can set the player's spawn point into any dimension.Template:Note.
Syntax
- Java Edition
spawnpoint [<targets>] [<pos>] [<angle>]
- Bedrock Edition
spawnpoint [player: target] [spawnPos: x y z]
Arguments
Template:El: <targets>: entity
Template:El: player: target: CommandSelector<Player>
- Specifies the player whose spawn point should be set. If not specified, defaults to the command's executor.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|entity}}{{#vardefine:be-arg|entity}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
Template:El: <pos>: block_pos
Template:El: 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 Template:Editions or the command's execution in Template:Editions.
- in Template:Editions,
<x>and<z>should be in the range of [-30000000, 30000000), and<y>should be in the range of [-20000000, 20000000). - in Template:Editions,
<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 Template:Editions:
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|block_pos}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
- in Template:Editions:
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|vec3}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
- REDIRECT Template:Edition
Template:Rcat: <angle>: angle
- Specifies the yaw angle to spawn with. Defaults to the direction the executor is facing.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|angle}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
Result
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Output
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|0}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the number of players whose spawnpoints are set}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|be}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|the number of players whose spawnpoints are set}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
History
Java Edition
Bedrock Edition
See also
- REDIRECT Template:Command
- REDIRECT Template:Command
Notes
References
<references/>
External links
de:Befehl/spawnpoint es:Comandos/spawnpoint ja:コマンド/spawnpoint pt:Comandos/spawnpoint ru:Команды консоли/spawnpoint uk:Команди консолі/spawnpoint zh:命令/spawnpoint