Minecraft:Commands/teleport
More actions
|
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