/ Tp

The /tp command is used to teleport entities; you can teleport them to specific coordinates or to other entities.

In this command, there are three possibilities: coordinates (~ ~ ~), entities (@e), and players (@a, @p, @s).

Command logic: /tp [player or entity] [player, entity or coordinates]


Player to entity

To teleport a player to a entity, we must first specify the type of player (@p, @a, @s), and then we need to enter the entity (@e) to which we want them to be teleported.

/tp @p @e[type=chicken]
GIF

Player to coordinates

To teleport a player to a coordinate, we must first specify the type of player (@p, @a, @s), and then we need to enter the coordinates to which we want them to be teleported. We use absolute coordinates (no ~) if we want to move to a fixed location, we use relative coordinates (with a ~) if we want to teleport relative to our position. We can mix relative and absolute coordinates in a command. For example, /tp -10 ~ 15 would teleport us to a point in the world but maintain our altitude.

/tp @p 26 -60 -33
GIF

Entity to player

We can teleport entities to our location. We will need to specify to only teleport entities (@e) and specify in the type of entity, e.g., a chicken.

/tp @e[type=chicken] @p
GIF

Entity to Coordinates

We will need to specify to only teleport entities (@e) and specify in the type of entity, e.g., a chicken.

/tp @e[type=chicken] 31 -59 -36
GIF