Teleport a player
teleport_playerTeleport a player to exact coordinates, another online player, or a world spawn. Choose one destination and verify surface height with get_block first to avoid unsafe landings.
Instructions
Teleport to coordinates, to another player, or to a world's spawn; give exactly one. Check the surface with get_block (no y) first to land on solid ground. The player must be online; otherwise the error is player_offline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| player | Yes | Player name or UUID | |
| location | No | A spot in a world; y is height (the overworld runs from -64 to 319) | |
| toPlayer | No | Another player's name or UUID | |
| worldSpawn | No | A world name |