Commands/teleport

Teleports entities (players, mobs, etc.).

Although most commands can only affect chunks that have already been generated, 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.

Syntax

 * Java Edition


 * Bedrock Edition

Arguments
(BE: )
 * Specifies the entity(s) to be teleported. Must be a player name, a target selector, or a UUID.
 * Permits entities other than players.

(BE: )
 * 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.

(BE: )
 * Specifies the entity to teleport the target(s) to. Must be a player name, a target selector, or a UUID.
 * Permits entity other than players.

(BE:  and  )
 * Specifies the rotation.
 * For 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.
 * For 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.

(BE: )
 * 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.

(BE: )
 * Specifies the entity to make the target(s) facing to. Must be a player name, a target selector, or a UUID.
 * Permits entity other than players.


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


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

Result
Fails if the arguments are not specified correctly, or if  fails to resolve to one or more entities (named players must be online), if   or   fails to resolve to a single entity (a named player must be online), or if checkForBlocks: Boolean is   and the destination is obscured $$.

On success, teleports the targets to the specified destination.

Examples

 * To teleport yourself to Alice:


 * To teleport all players to yourself:


 * To teleport yourself to x=100 and z=100, but three blocks above your current position:


 * To rotate the nearest player 10 degrees to the right without changing their position:


 * $$, 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:
 * To teleport all players to x=84 y=57 z=79 in the End:
 * To teleport Alice to x=251 y=64 z=-160 in the Overworld:

History
Befehl/teleport