Commands/tp/Before Java Edition 17w45a

From Minecraft Wiki
< Commands‎ | tp
Jump to: navigation, search
tp
Restrictions

Operator

First introduced

Java Edition Alpha v1.0.16_01

Rose (2D).png
This page describes content that exists only in outdated versions of Minecraft.
This feature used to be in the game but has since been removed.

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

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

Although most commands can only affect chunks that have already been generated, /tp 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[edit]

tp <destination player>
tp <x> <y> <z> [<yaw> <pitch>]
tp <target player> <destination player>
tp <target player> <x> <y> <z> [<yaw> <pitch>]

Arguments[edit]

<target player>

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

<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 target's current position – an exception to tilde notation's usual rule of being relative to the executor of the command. /teleport can be used to teleport relative to executor of the command.

<destination player>

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.

<yaw> and <pitch>

Specifies the rotation.
For the horizontal rotation (yaw), -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 (pitch), -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[edit]

Fails if the arguments are not specified correctly, if <target player> fails to resolve to one or more entities (named players must be online), or if <destination player> fails to resolve to a single entity (a named player must be online). Fails individually for each entity referenced by <target player> that is not in the same dimension as the <destination player>, if specified.

On success, teleports the targets to the specified destination.

Examples[edit]

  • To teleport yourself to Alice: tp Alice
  • To teleport all players to yourself: tp @a @s
  • To teleport yourself to x=100 and z=100, but three blocks above your current position: tp 100 ~3 100
  • To rotate the nearest player 10 degrees to the right without changing their position: tp @p ~ ~ ~ ~10 ~

History[edit]

Java Edition Classic
0.0.18aAdded /teleport.
server 1.7Added /tp, an alias for /teleport.
Java Edition Indev
0.31Removed all commands.
Java Edition Alpha
v1.0.16_01Re-added /tp.
Java Edition
1.814w03aAdded rotation arguments to /tp.
1.9.3pre1/tp no longer teleports the player to a y-coordinate outside the range -512 to 512.
1.1016w21bThe y-coordinate range of /tp is increased to −4096 to 4096.
Now the specified destination is relative to executor of the command, instead of the target's current position.
pre1Behavior is reverted back to 16w20a and previous versions.
1.1317w45a/tp is no longer different from /teleport now, and become an alias of /teleport.