# 🌍 Worlds

Provides basic multiworld features.

## Commands & Permissions

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

## Features

* ✅ **GUI Editor**. Edit custom and default worlds with a GUI editor.
* ✅ **Unlimited Worlds**. Create as many worlds as you wish.
* ✅ **Auto-Load**. Automatically load certain world(s) on plugin load.
* ✅ **Auto-Wipe**. Automatically reset custom world(s) with certain interval.
* ✅ **Environment**. Select Environment when creating new worlds.
* ✅ **Difficulty**. Change Difficulty of any world at any time.
* ✅ **Game Rules**. Edit Game Rules of any world at any time in a GUI editor.
* ✅ **Built-in Generators**. Create Void, Plains and Flat worlds.
* ✅ **Inventory Split**. Split player's inventory and ender chest based on world groups.
* ✅ **Command Blocker**. Disable certain command(s) in certain world(s).
* ✅ **Fly Limiter**. Disable flying in certain world(s).

## Configuration

### Editor

Use **/editworld** command to open the **GUI Editor**.

### Inventory Split

To enable the feature, open **settings.yml** of the Worlds module and set `Inventory_Split` -> `Enabled` on `true`.

By default it's configured to split player's inventory and ender chest content for 2 world groups:

* **Survival**. Worlds included: `world`, `world_nether` and `world_the_end`
* **Creative**. Worlds included: `world_creative`

When player goes to the `world_creative` from any world of the **Survival** world group, their inventory will be replaced with the one stored in the **Creative** group.

The same happens when player goes from any world of the **Creative** group to the **Survival** one.

You can create as many groups as want. Just make sure that you **don't** have the same world in multiple groups.

```yaml
Inventory_Split:
  Enabled: true
  Affected_Inventories:
  - PLAYER
  - ENDER_CHEST
  World_Groups:
    survival:
    - world
    - world_nether
    - world_the_end
    creative:
    - world_creative
```

### Command Blocker

To enable the feature, open **settings.yml** of the Worlds module and set `Command_Blocker` -> `Enabled` on `true`.

By default it's configured to block **/feed** and **/heal** commands in the world called `flat`.

You can add as many worlds and commands there as you want.

```yaml
Command_Blocker:
  Enabled: true
  World_Commands:
    flat:
    - feed
    - heal
```

### Auto Wipe

You can enable **Auto-Wipe** feature for any custom world using the GUI Editor: **/editworld**

Just enable the option and set reset interval there.

You can configure world's reset notifications settings in the **settings.yml** of the **Worlds** module.

Also, you might want to configure the destination location for players before the world reset under `MovePlayersOut` section.


---

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