Articles on: Minecraft

How to use teleport commands in Minecraft

Teleport commands allow for player and entity travel (both to and from a target destination), transporting to specific coordinates as well as being able to rotate the entity to face in a particular direction or at another entity

Teleport commands in Bedrock Edition are written slightly differently, though they have the same effect. Additionally, Bedrock Edition allows you to check for blocks at the target destination to prevent player or entity suffocation using the checkForBlocks extension to your command.

To use teleport commands in Java and Bedrock Editions, players must have Operator (OP) permissions, which can be given from console or another opped player. Bedrock Edition servers must also have cheats enabled.

All /teleport commands can be shortened to /tp

Syntax for Java Edition



CommandExecution
/teleport (location) <br>(e.g. /teleport 123 45 678)To teleport (the entity running the command) to a set of coordinates
/teleport (destination)To teleport (the entity running the command) to the location of another target
/teleport (targets) (destination)To teleport a target to the location of another target
/teleport (targets) (location) facing (facingLocation)To teleport a target to a set of coordinates facing the direction of another set of coordinates
/teleport (targets) (location) [(yRot) (xRot)]To teleport a target to a set of coordinates and rotate the direction the target will be facing


Definitions



location or x y z are coordinate points to teleport to.
destination is the name of the player (or a target selector) to teleport to.
yRot is optional, it is the y-rotation of the entity after teleportation in degrees. 0 = South, 90 = West, 180 = North, 270 = East
xRot is optional, it is the x-rotation of the entity after teleportation in degrees. Positive values look downward and negative values look upward. 0=facing forward, 90 = facing straight down, -90 = facing straight up
targets or entity is the name of a player (or a target selector) to teleport.
facingLocation is the x y z coordinate that the entity will face after being teleported.

Target selectors



Target selectorDescription
@pTargets the nearest player
@rTargets a random player
@aTargets all players
@eTargets all entities
@sTargets the entity that is executing the command (self)


Note: For @e see the full list of namespaced entity ID’s here

Syntax for Bedrock Edition



CommandExecution
/teleport (x) (y) (z) [yRot] [xRot]To teleport the entity running the command to a set of coordinates
/teleport (x) (y) (z) facing (lookAtPosition)To teleport the entity running the command to a set of coordinates facing the direction of another set of coordinates
/teleport (x) (y) (z) facing (lookAtEntity)To teleport the entity running the command to a set of coordinates facing the direction of a target entity
/teleport (victim) (x) (y) (z) [yRot] [xRot]To teleport a target to a set of coordinates
/teleport (victim) (x) (y) (z) facing (lookAtPosition)To teleport a target to a set of coordinates facing the direction of another set of coordinates
/teleport (victim) (x) (y) (z) facing (lookAtEntity)To teleport a target to a set of coordinates facing the direction of a target entity
/teleport (destination)To teleport the entity running the command to the location of another target
/teleport (victim) (destination)To teleport a target to the location of another target
[checkForBlocks: Boolean]Extension to the end of your teleport command which checks for a block at the destination. (Boolean true or false).


Definition



x y z are coordinate points to teleport to.
yRot is optional, it is the y-rotation of the entity after teleportation.
xRot is optional, it is the x-rotation of the entity after teleportation.
lookAtPosition is a set of x y z coordinates that the entity will face after being teleported.
lookAtEntity is the name of a player (or a target selector) that the entity will face after being teleported.
victim is the name of a player (or a target selector) to teleport.
destination is the name of a player (or a target selector) to teleport to.


If you require any further assistance, please create a ticket here.


Created By: Steven C.

Updated on: 12/09/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!