# Configuration

The configuration system for BlanketRTP has been overhauled in version 2.0. This file allows you to manage teleportation logic, dimension handling, performance settings, and visual effects.

**File Location:** `config/blanketrtp/blanketrtp.json`

***

### Core RTP Options

Basic settings for the random teleportation mechanics.

```json
"rtpEnabled": true,
"rtpRadius": 5000
```

* **rtpEnabled**: Toggles the RTP mechanics globally.
* **rtpRadius**: The maximum radius (in blocks) from the center of the world (0,0) where players can be teleported.

***

### Dimension Redirects

Instead of a simple "blocked" list, BlanketRTP now uses a redirection system. If a player runs `/rtp` in a specific dimension, you can force them to teleport into a different one.

```json
"dimensionRedirects": [
  {
    "from": "minecraft:the_end",
    "to": "minecraft:overworld"
  },
  {
    "from": "minecraft:the_nether",
    "to": "minecraft:overworld"
  }
]
```

* **from**: The dimension the player is currently in.
* **to**: The dimension the player will be sent to.
* **Note**: If you want players to RTP normally within the End or Nether, simply remove these entries from the list.

***

### Cooldown Management

Cooldowns are now tier-based, allowing you to give shorter wait times to ranked players or staff.

```json
"cooldownBypassPermission": "blanketrtp.admin.bypass.cooldown",
"cooldowns": [
  {
    "permission": "blanketrtp.cooldown.vip",
    "duration": 30
  },
  {
    "permission": "blanketrtp.cooldown.member",
    "duration": 60
  },
  {
    "permission": "",
    "duration": 120
  }
]
```

* **cooldownBypassPermission**: Players with this permission ignore all cooldowns.
* **cooldowns**: A list of tiers. The mod checks these top-to-bottom.
  * **permission**: The node required for this tier. Leave empty (`""`) for the default tier applicable to everyone.
  * **duration**: Time in seconds the player must wait.

***

### Gliding Options

Settings for the "drop from the sky" mechanic.

#### General & Visuals

```json
"glidingOptions": {
  "enabled": true,
  "teleportHeight": 150,
  "particlesEnabled": true,
  "particleType": "minecraft:cloud",
  "particleAmount": 5,
  "particleUpdateRate": 2,
  "particleOffsetX": 0.0,
  "particleOffsetY": -0.5,
  "particleOffsetZ": 0.0
  ...
}
```

* **teleportHeight**: The Y-level players are teleported to (drop height).
* **particlesEnabled**: Toggles trail particles while gliding.
* **particleType**: The ID of the particle to display.

#### Glider Item

Controls the item equipped automatically to allow flight (e.g., Elytra).

```json
"gliderSlot": "CHEST",
"glider": {
  "gliderItemId": "minecraft:elytra",
  "gliderNbtData": "{Damage:0}"
}
```

* **gliderSlot**: The inventory slot to equip the item to (e.g., `CHEST`).
* **gliderItemId**: The resource location of the item.
* **gliderNbtData**: Raw NBT data string for the item. Use this for enchantments, names, or custom model data.
  * *Example for Unbreaking:* `"{Damage:0,Enchantments:[{id:unbreaking,lvl:3}]}"`

***

### Performance (Slow Load)

To prevent server lag (TPS drops) when teleporting to ungenerated chunks, BlanketRTP can pre-load the area slowly before teleporting the player.

```json
"slowLoadOptions": {
  "enabled": true,
  "radius": 1,
  "keepLoadedSeconds": 5,
  "loadDelayMillis": 250
}
```

* **radius**: The radius of chunks to load. `1` results in a 3x3 chunk area.
* **loadDelayMillis**: The pause (in milliseconds) between loading each chunk. Higher numbers = smoother server performance but slower teleport startup.
* **keepLoadedSeconds**: How long chunks stay forced loaded to ensure the player lands safely.

***

### Biome RTP Settings

Settings for the `/rtp biome <biome>` command.

```json
"biomeRtpEnabled": true,
"biomeMaxAttempts": 40,
"biomeSearchBatchSize": 32,
"biomeMaxTicks": 100
```

* **biomeMaxAttempts**: How many random spots the mod checks to see if the biome matches.
* **biomeSearchBatchSize**: How many chunks to check per tick (performance setting).

***

### Permissions Configuration

You can customize the actual permission nodes and their default OP levels directly in the config.

```json
"permissions": {
  "rtp": {
    "node": "blanketrtp.rtp",
    "permissionLevel": 0,
    "opLevel": 0
  },
  "reload": {
    "node": "blanketrtp.admin.reload",
    "permissionLevel": 2,
    "opLevel": 2
  }
  ...
}
```

***

### Messages

Messages support **MiniMessage** formatting (e.g., `<red>`, `<gradient:red:blue>`).

```json
"cooldownMessage": "<red>RTP is on cooldown. Please wait <gold>{time} <red>seconds.",
"searchingBiomeMessage": "<gold>Scanning world for biome <yellow>{biome}<gold>...",
"teleportSuccessMessage": "<green>Teleported to <yellow>{x}, {y}, {z}<green>!",
"slowLoadMessage": "<green>Preparing chunks... <yellow>{percent}%"
```

{% hint style="info" %}
**Applying Changes:** After editing the file, use `/rtp reload` to apply changes immediately without restarting the server.
{% endhint %}
