# ⛺ Spawns

Provides basic spawn features.

## Commands & Permissions

* [Commands](https://nightexpress.gitbook.io/sunlight/general/commands#spawns-module) link.
* [Permissions](https://nightexpress.gitbook.io/sunlight/general/permissions#spawns-module) link.

## Features

* ✅ **Unlimited Spawns**. Create as many spawns as you wish.
* ✅ **GUI Editor**. Edit your spawns with a simple GUI editor.
* ✅ **Permission Requirement**. Set spawn(s) to require permission for being able to use them.
* ✅ **Teleport on Login**. Teleport players on certain spawn on login depends on their rank.
* ✅ **For New Players**. Teleport new players on certain spawn on login.
* ✅ **Teleport on Death**. Teleport players on certain spawn on death depends on their rank.
* ✅ **Respect Bed Location**. Do not teleport players on death to a spawn if they have a bed or repsawn anchor.

## Configuration

### Editor

Use **/editspawn** command to open the **GUI Editor** to edit spawn's settings.

### Teleport New Players

To make this feature work properly, make sure that it's enabled in the **settings.yml** in `Teleport_New_Players` -> `Enabled: true` and that the `SpawnId` option there has the valid spawn name.

### Teleport on Login

To make this feature work properly:

1. Create a new spawn (if needed): **/setspawn**
2. Open the Editor: **/editspawn**
3. Select a spawn where you want players to be teleported on login.
4. Enable the **Login Teleport** setting.
5. A new option called **Login Groups** will appear.
6. Add there all rank names that should be teleported on this spawn, or `*` to include all ranks.

If you want to use **multiple spawns** for the **Login Teleport** feature for different ranks, make sure to edit the **Priority** spawn setting according to your ranks priority.

Make sure that players with these ranks have permission to use the spawn, or just disable the spawn permission requirement.

### Teleport on Death

Steps are the same as for **Teleport on Login**, but options called **Death Teleport** and **Death Groups**.


---

# 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://nightexpress.gitbook.io/sunlight/modules/spawns.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.
