How to Use Teleport Commands

Minecraft

·

Sep 11, 2024

·

26 Mins Read

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

CommandExecution
/teleport (location)
(e.g. /teleport 123 45 678)
To teleport (the entity/player running the command) to a set of coordinates.
/teleport (destination)To teleport (the entity/player 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).

# 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.

Zach's Avatar
Zach Lowery

Game Experience Engineer