Minecraft:Commands/teleport: Difference between revisions
More actions
Remove broken links to missing pages |
Sync: updated from Minecraft |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{about|the command in the current version (since Java Edition 1.13 (17w45a))|the command in former game versions|Commands/tp/Before Java Edition 17w45a}} | {{about|the command in the current version (since [[Minecraft:Java Edition 1.13]] ([[Minecraft:Java Edition 1.13|17w45a]]))|the command in former game versions|Commands/tp/Before Java Edition 17w45a}} | ||
{{Infobox command | {{Infobox command | ||
|name=teleport | |name=teleport | ||
| Line 6: | Line 6: | ||
* 2 {{only|java|short=1}} | * 2 {{only|java|short=1}} | ||
* 1 {{only|bedrock|short=1}} | * 1 {{only|bedrock|short=1}} | ||
|others=Cheat only{{only|bedrock|short=1}} | |others=[[Minecraft:Cheat]] only{{only|bedrock|short=1}} | ||
}} | }} | ||
Teleports entities (players, mobs, etc.). | Teleports [[Minecraft:entities]] (players, mobs, etc.). | ||
Although most [[Minecraft:commands]] can affect only | Although most [[Minecraft:commands]] can affect only [[Minecraft:chunk]]s that have already been generated, {{cmd|teleport}} can send entities into chunks that have yet to be generated. Right before teleporting, the game generates the destination chunk. | ||
==Syntax== | ==Syntax== | ||
| Line 127: | Line 127: | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|java classic}} | |{{HistoryLine|java classic}} | ||
|{{HistoryLine||0.0.18a|Added {{cmd|teleport|link=none}}.}} | |{{HistoryLine||0.0.18a|dev=server 1.4|Added {{cmd|teleport|link=none}}.}} | ||
|{{HistoryLine||0.0.19a_06|dev=server 1.7|Added {{cmd|tp|link=none}} as an alias for {{cmd|teleport|link=none}}.}} | |||
|{{HistoryLine|java indev}} | |{{HistoryLine|java indev}} | ||
|{{HistoryLine||0.31|dev=20091231-1856|Removed {{cmd|teleport|link=none}}.{{check version|Was it removed individually in this specific version, or was it no longer able to be used in Indev just like every other command?}}}} | |{{HistoryLine||0.31|dev=20091231-1856|Removed {{cmd|teleport|link=none}}.{{check version|Was it removed individually in this specific version, or was it no longer able to be used in Indev just like every other command?}}}} | ||
| Line 160: | Line 161: | ||
{{Navbox commands}} | {{Navbox commands}} | ||
de:Befehl/teleport | [[Minecraft:de:Befehl/teleport]] | ||
es:Comandos/tp | [[Minecraft:es:Comandos/tp]] | ||
ja:コマンド/teleport | [[Minecraft:ja:コマンド/teleport]] | ||
pt:Comandos/teleport | [[Minecraft:pt:Comandos/teleport]] | ||
ru:Команды консоли/teleport | [[Minecraft:ru:Команды консоли/teleport]] | ||
zh:命令/teleport | [[Minecraft:zh:命令/teleport]] | ||
Latest revision as of 11:09, 10 April 2026
|
For the {{{Description}}} of the same name, see [[{{{Destination}}}]]. |
Teleports Minecraft:entities (players, mobs, etc.).
Although most Minecraft:commands can affect only Minecraft:chunks that have already been generated, Template:Cmd can send entities into chunks that have yet to be generated. Right before teleporting, the game generates the destination chunk.
Syntax
- Java Edition
teleport <destination>teleport <targets> <destination>- Teleports the executor or the specified entity(s) to the position of an entity, and makes its rotation the same as the specified entity's.
teleport <location>- Teleports the executor to a certain position (and changes its rotation to the command's execution rotation).
teleport <targets> <location>- Teleports the entity(s) to a certain position (without changing their rotation).
teleport <targets> <location> <rotation>teleport <targets> <location> facing <facingLocation>teleport <targets> <location> facing entity <facingEntity> [<facingAnchor>]- Teleports the entity(s) to a certain position and changes their rotation to the specified rotation.
- Bedrock Edition
teleport <destination: target>teleport <victim: target> <destination: target> [checkForBlocks: Boolean]- Teleports the executor or the specified entity(s) to the position of an entity, and makes it face horizontally, and make its horizontal rotation the same as the specified entity's.
teleport <destination: x y z> [checkForBlocks: Boolean]teleport <victim: target> <destination: x y z> [checkForBlocks: Boolean]- Teleports the executor or the specified entity(s) to a certain position (without changing its rotation).
teleport <destination: x y z> [yRot: value] [xRot: value] [checkForBlocks: Boolean]teleport <destination: x y z> facing <lookAtPosition: x y z> [checkForBlocks: Boolean]teleport <destination: x y z> facing <lookAtEntity: target> [checkForBlocks: Boolean]teleport <victim: target> <destination: x y z> [yRot: value] [xRot: value] [checkForBlocks: Boolean]teleport <victim: target> <destination: x y z> facing <lookAtPosition: x y z> [checkForBlocks: Boolean]teleport <victim: target> <destination: x y z> facing <lookAtEntity: target> [checkForBlocks: Boolean]- Teleports the executor or the specified entity(s) to a certain position and changes their rotation to the specified rotation.
Arguments
- Specifies the entity(s) to be teleported. If not specified, defaults to the command's executor.
- Template:Arg desc
- Specifies the coordinates to teleport the target(s) to.
- Template:Arg desc
- Specifies the entity to teleport the target(s) to.
- Template:Arg desc
Template:El: Template:Argument
Template:El: Template:Argument and Template:Argument
- Specifies the rotation.
- Template:Arg desc
- Specifies the coordinates to make the target(s) facing to.
- Template:Arg desc
- Specifies the entity to make the target(s) facing to.
- Template:Arg desc
Template:El: Template:Argument
- Specifies whether the entity'eyes or feet to make the target(s) facing to. If not specified, defaults to feet. Template:IN, the anchor of the targets can be changed with Template:Cmd. Template:IN, always facing the entity's feet from the targets' feet.
- Template:Arg desc
Template:El: Template:Argument
- Template:Arg desc
- If set to
true, teleports the target(s) only if the target(s) would not collide with a block it cannot be inside (Note: this allows teleporting into flowers as well as midair). Iffalseor not specified, the default behavior applies (do no check; just teleport the target(s)).
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
Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table
Examples
- To teleport the executing player to Alice:
teleport Alice
- To teleport all players to the executing player:
teleport @a @s
- To teleport the executing player to x=100 and z=100, but three blocks above their current position:
teleport 100 ~3 100 - To teleport the executing player 1 block forward
teleport ^ ^ ^1
- To rotate the nearest player 10 degrees to the right without changing their position:
execute as @p at @s run teleport @s ~ ~ ~ ~10 ~
- When used via the execute command, can teleport between the Overworld, the Nether and the End:
- To teleport the executing player to the same coordinates, but in the Nether:
execute in minecraft:the_nether run teleport ~ ~ ~Template:Onlyexecute in nether run teleport ~ ~ ~Template:Only
- To teleport all players to x=84 y=57 z=79 in the End:
execute as @a in minecraft:the_end run teleport 84 57 79Template:Onlyexecute as @a in the_end run teleport 84 57 79Template:Only
- To teleport Alex to x=251 y=64 z=-160 in the Overworld:
execute as Alex in minecraft:overworld run teleport 251 64 -160Template:Onlyexecute as Alex in overworld run teleport 251 64 -160Template:Only
- To teleport the executing player to the same coordinates, but in the Nether:
History
Java Edition
Bedrock Edition
External links
Minecraft:de:Befehl/teleport Minecraft:es:Comandos/tp Minecraft:ja:コマンド/teleport Minecraft:pt:Comandos/teleport Minecraft:ru:Команды консоли/teleport Minecraft:zh:命令/teleport