Commands/teleport

From Minecraft Wiki
Jump to: navigation, search
teleport
Aliases
Restrictions

Operator

First introduced

Java Edition 1.10 (Java Edition 1.10-pre1)
PE Alpha 0.16.0 (PE Alpha 0.16.0 build 1)

Teleports entities (players, mobs, items, etc.).

In the Java Edition, the primary difference between this command and the /tp command is that /teleport uses coordinates relative to the command's execution, while /tp uses coordinates relative to the teleported targets.

Although most commands can only affect chunks that have already been generated, /teleport can send entities into chunks that have yet to be generated. If this happens to a player, then the chunks around and including that player's destination will be newly generated.

In Bedrock Edition and Java Edition 1.13, /tp is simply an alias for /teleport.

Syntax
  • Java Edition
teleport <destination>
teleport <targets> <destination>
teleport <targets> <entity>
teleport <targets> <location> facing <facingLocation>
teleport <targets> <location> facing entity <facingEntity> [<facingAnchor>]
teleport <targets> <location> [<rotation>]
  • Bedrock Edition
teleport <destination: x y z> [yRot: value] [xRot: value]
teleport <destination: x y z> facing <lookAtPosition: x y z>
teleport <destination: x y z> facing <lookAtEntity: target>
teleport <victim: target> <destination: x y z> [yRot: value] [xRot: value]
teleport <victim: target> <destination: x y z> facing <lookAtPosition: x y z>
teleport <victim: target> <destination: x y z> facing <lookAtEntity: target>
teleport <destination: target>
teleport <victim: target> <destination: target>
Arguments
target entity (BE: victim: target)
Specifies the entity(s) to be teleported. Must be either a player name or a target selector.
x y z (BE: destination: x y z)
Specifies the coordinates to teleport the target(s) to. x and z must fall within the range -30,000,000 to 30,000,000 (exclusive, without the commas), and y must be within the range -4096 to 4096 inclusive. May use tilde and caret notation to specify a position relative to the position of the executor of the command (use /execute to teleport using coordinates relative to the target instead).
destination: target[Bedrock Edition only]
Specifies the entity to teleport the target(s) to. Must be either a player name or a target selector.
y-rot (BE: yRot: value) (optional)
Specifies the horizontal rotation (-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 target's previous rotation.
x-rot (BE: xRot: value) (optional)
Specifies the vertical rotation (-90.0 for straight up to 90.0 for straight down). Tilde notation can be used to specify a rotation relative to the target's previous rotation.
Result
Fails if the arguments are not specified correctly, or if target entity fails to resolve to one or more entities (named players must be online).
On success, teleports the targets to the specified destination.
Examples
To teleport yourself to Alice: teleport Alice
To teleport all players to yourself: teleport @a @p
To teleport yourself to x=100 and z=100, but three blocks above your current position: teleport 100 ~3 100
To rotate the nearest player 10 degrees to the right without changing their position: teleport @p ~ ~ ~ ~10 ~
When used via the execute command, can teleport between the Overworld, the Nether and the End:
To teleport yourself to the same coordinates, but in the Nether: execute in minecraft:the_nether run teleport ~ ~ ~
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 79
To teleport Alice to x=251 y=64 z=-160 in the Overworld: execute as Alice in minecraft:overworld run teleport 251 64 -160
NOTE: When running from a command block or function -- be careful of unintended consequences when using relative positions with teleport (versus the tp command). As discussed above, teleport uses coordinates relative to the position where the command is executed and not relative to the position of any targeted players or entities.

History[edit]

Java Edition
1.10pre1Added /teleport, which is like /tp, except that the target parameter is mandatory, the 'teleport to other player' usage is unavailable, and the use of relative coordinates is relative to the executor of the command, rather than relative to the target.
1.1318w01aAdded facing to /teleport, which will make the target entity face an entity or a location.
18w02a/teleport has been simplified a bit and players can now teleport to entities in other dimensions.
Pocket Edition Alpha
0.16.0build 1Added /teleport.