# Teleporting

Staff++ introduces new teleport commands. These very basic commands can be used to teleport yourself or other players.

## Locations

You can specify predefined locations inside the configuration file. This allows you to teleport yourself or other players to this location.\
Make sure the following section is present in your configuration file:

```yaml
############################################################
# +------------------------------------------------------+ #
# |                       Locations                        | #
# +------------------------------------------------------+ #
############################################################
# Used to predefine certain locations in the world which can be used in other commands
# Type in the location identifier and location using format: x;y;z
# ex. config
# locations:
#     spawn: 14;45;62;world
# ex. /freeze myplayer -Tspawn
# This will freeze the player and teleport him to spawn location.
locations:
```

You can define multiple locations underneath the `locations` section. Example:

```yaml
locations:
     spawn: 14;45;62;world
     jail: 58;789;70;world_nether
```

## Commands:

### Teleport a player to a location:

The `teleportToLocation` command can also be used as an argument `-T` to enhance other commands.

```
/teleportToLocation thatplayer spawn
```

### Teleport yourself to a player:

```
/teleportToPlayer thatplayer
```

### Teleport a player to your location:

```
/teleportHere thatplayer
```

### Teleport a player back to his original location:

This only works if the player has been teleported at least ones before. Previous locations are lost when the server restarts.

```
/teleportBack thatplayer
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.staffplusplus.org/features/teleporting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
