Commands/teleport

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

Operator

First introduced

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

Teleports entities (players, mobs, etc.).

Although most commands can affect only 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 are newly generated.

Syntax[edit]

  • Java Edition
teleport <destination>
teleport <location>
teleport <targets> <destination>
teleport <targets> <location> [<rotation>]
teleport <targets> <location> facing <facingLocation>
teleport <targets> <location> facing entity <facingEntity> [<facingAnchor>]
  • Bedrock Edition
teleport <destination: x y z> [checkForBlocks: Boolean]
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]
teleport <destination: target> [checkForBlocks: Boolean]
teleport <victim: target> <destination: target> [checkForBlocks: Boolean]

Arguments[edit]

<targets> (BE: victim: target)

Specifies the entity(s) to be teleported. Must be a player name, a target selector, or a UUID[Java Edition only].
Permits entities other than players.

<location> (BE: destination: x y z)

Specifies the coordinates to teleport the target(s) to. May use tilde and caret notation to specify a position relative to the position where the command is executed.

<destination> (BE: destination: target)

Specifies the entity to teleport the target(s) to. Must be a player name, a target selector, or a UUID[Java Edition only].
Permits entity other than players.

<rotation> (BE: yRot: value and xRot: value)

Specifies the rotation.
For the horizontal rotation (yRot: value), -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.
For the vertical rotation (xRot: value), -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.

<facingLocation> (BE: lookAtPosition: x y z)

Specifies the coordinates to make the target(s) facing to. May use tilde and caret notation to specify a position relative to the position where the command is executed.

<facingEntity> (BE: lookAtEntity: target)

Specifies the entity to make the target(s) facing to. Must be a player name, a target selector, or a UUID[Java Edition only].
Permits entity other than players.

<facingAnchor>[Java Edition only]

Specifies whether the entity'eyes or feet to make the target(s) facing to. Must be one of eyes and feet. If not specified, defaults to eyes. In Bedrock Edition, always facing eyes.

checkForBlocks: Boolean[Bedrock Edition only]

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). If false or not specified, the default behavior applies (do no check; just teleport the target(s)).

Result[edit]

Fails if the arguments are not specified correctly, or if <targets> fails to resolve to one or more entities (named players must be online), if <destination> or <facingEntity> fails to resolve to a single entity (a named player must be online), or if checkForBlocks: Boolean is true and the destination is obscured in Bedrock Edition.

On success, teleports the targets to the specified destination .

Examples[edit]

  • To teleport yourself to Alice: teleport Alice
  • To teleport all players to yourself: teleport @a @s
  • 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:
  • In Java Edition, 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

History[edit]

This section is a stub, meaning that it lacks some important information. You can help by expanding it with further information relating to the topic.
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.1317w45a/tp is no longer different from /teleport now, and become an alias of /teleport.
18w01aAdded facing to /teleport, which causes the target entity to 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.
?Added facing mode.
Added checkForBlocks: Boolean.