Commands/teleport

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

Operator

First introduced

1.10 (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 Pocket Edition, this command is simply an alias for /tp.

Syntax
  • Java Edition
teleport <target entity> <x> <y> <z> [<y-rot> <x-rot>]
  • Pocket Edition
teleport <destination: target>
teleport <destination: x y z> [y-rot: rotation] [x-rot: rotation]
teleport <victim: target> <destination: target>
teleport <victim: target> <destination: x y z> [y-rot: rotation] [x-rot: rotation]
Arguments
target entity (PE: victim: target)
Specifies the entity(s) to be teleported. Must be either a player name or a target selector.
x y z (PE: 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 notation to specify a position relative to the position of the executor of the command (use /tp or /execute to teleport using coordinates relative to the target instead).
destination: target [Pocket Edition only]
Specifies the entity to teleport the target(s) to. Must be either a player name or a target selector.
y-rot (PE: y-rot: rotation) (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 (PE: x-rot: rotation) (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).[verify]
On success, teleports the targets to the specified destination.