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.
Note
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.
# Java Edition Syntax
# 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
Note
For @e, see the full list of namespaced entity ID’s here.
# Syntax for Bedrock Edition
# Definitions
- 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.
That's it! You now know how to use teleport commands on your Minecraft server.