# Configuration

### Configuration File

The configuration file is located at `plugins/SpawnElytra/config.yml`.

After making changes, use `/spawnelytra reload` to apply most changes. Some features like hunger consumption mode require a full server restart.

### Color Codes

Messages use the [MiniMessage Format](https://docs.papermc.io/adventure/minimessage/format/).

***

## Global Settings

### Language

```yaml
# Available languages: en, de, es, fr, pl
language: en
```

Sets the plugin language. Currently supports English, German, Spanish, French, and Polish.

### Game Mode Restrictions

```yaml
game_modes:
  # Automatically disable elytra when player enters creative mode (This prevents buggy flying in Creative)
  disable_in_creative: true
  # If you don't want to disable elytra in adventure mode, set this to false
  disable_in_adventure: false
```

Prevents elytra from activating in certain game modes. Creative mode can cause buggy flying behavior when combined with spawn elytra.

### Fireworks Settings

```yaml
fireworks:
  # Disable fireworks when using spawn elytra (players can still use fireworks if they have a real elytra equipped)
  disable_in_spawn_elytra: false
```

When enabled, prevents players from using fireworks while using the spawn elytra feature. They can still use fireworks with an actual elytra equipped.

### Message Settings

```yaml
messages:
  # Set to false to disable the "press to boost" message
  show_press_to_boost: true
  # Set to false to disable the "boost activated" message
  show_boost_activated: true
  # Set to true to show an actionbar when Elytra is disabled in Creative mode
  show_creative_disabled: false
  # Message style: classic or small_caps
  style: classic
```

Controls which messages appear and their style. The `small_caps` style displays messages in a stylized small capitals font.

### Visualization Settings

```yaml
visualization:
  # Vertical range above and below player for particle display
  vertical_range: 20
  # Additional vertical range for corner/cardinal pillars
  pillar_vertical_range: 25
  # Particle update frequency (ticks between updates, lower = more frequent)
  update_frequency: 10
  # Particle size multiplier for better visibility from distance
  particle_size: 2.0
  # Enable enhanced particles (brighter colors, additional effects)
  enhanced_particles: true
```

These settings control the `/spawnelytra visualize` command, which displays particles showing the spawn elytra area boundaries.

### Hunger Consumption Settings

```yaml
hunger_consumption:
  # Enable hunger consumption while using the spawn elytra features
  enabled: false
  # How hunger should be consumed: activation, distance, or time
  mode: activation
  # Minimum food level to keep (players will never drop below this value)
  minimum_food_level: 0

  activation:
    # Hunger consumed each time the elytra activates
    hunger_cost: 1

  distance:
    # Blocks travelled while gliding before hunger is consumed
    blocks_per_point: 50.0
    # Hunger consumed every time the distance threshold is reached
    hunger_cost: 1

  time:
    # Seconds of gliding before hunger is consumed
    seconds_per_point: 30
    # Hunger consumed each time the timer elapses
    hunger_cost: 1
```

Optional hunger consumption while using spawn elytra. Three modes available:

* **activation**: Consumes hunger each time the elytra activates
* **distance**: Consumes hunger after flying a certain distance
* **time**: Consumes hunger after flying for a certain duration

***

## World-Specific Settings

You can configure different settings for each world. Copy the entire world section and change the name to add more worlds.

```yaml
worlds:
  world:
    # Enable spawn elytra in this world
    enabled: true
```

### Activation Mode

```yaml
    # Activation mode for elytra:
    # double_jump: Player needs to double-press space to activate elytra
    # auto: Automatically activates elytra when player has air below and is in spawn area
    # sneak_jump: Player needs to sneak while jumping to activate elytra
    # f_key: Player needs to press F (swap hands) to activate elytra, this also boosts a player upwards on activation
    activation_mode: double_jump
```

Four activation modes:

| Mode          | Description                                                |
| ------------- | ---------------------------------------------------------- |
| `double_jump` | Double-press space bar to activate                         |
| `auto`        | Automatically activates when airborne in spawn area        |
| `sneak_jump`  | Sneak while jumping to activate                            |
| `f_key`       | Press F (swap hands key) to activate with an upward launch |

### Spawn Area Configuration

```yaml
    # The radius around spawn where elytra boosting is enabled
    # (only used when area_mode is 'circular' or spawn coords x2/y2/z2 are all 0)
    radius: 100

    # Spawn area configuration
    spawn_area:
      # Mode options: 'auto' or 'advanced'
      # auto: Uses the world spawn point with radius
      # advanced: Uses custom spawn coordinates defined below
      mode: auto

      # Area type: 'circular' or 'rectangular'
      area_type: circular

      # Primary spawn coordinates (center for circular, first corner for rectangular)
      x: 0
      y: 64
      z: 0

      # Secondary coordinates (only used for rectangular areas)
      # Setting all to 0 uses circular area with radius instead
      x2: 0
      y2: 0
      z2: 0
```

Define where spawn elytra works:

* **auto mode**: Uses the world's spawn point as center
* **advanced mode**: Uses custom coordinates you define

Area types:

* **circular**: Uses center point and radius
* **rectangular**: Uses two corner points (pos1 and pos2)

### Boost Settings

```yaml
    boost:
      # Enable boost functionality
      enabled: true
      # The strength of the boost when pressing the boost key
      strength: 4
      # Boost direction: 'forward' or 'upward'
      # forward: Boosts player in the direction they are looking
      # upward: Boosts player straight up
      direction: forward
      # Boost sound effect - can be any sound from https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
      # Examples: ENTITY_BAT_TAKEOFF, ENTITY_FIREWORK_ROCKET_BLAST, ITEM_ELYTRA_FLYING
      sound: ENTITY_BAT_TAKEOFF
```

The boost feature lets players press F (swap hands key) while gliding to get a speed boost.

### F-Key Activation Settings

```yaml
    # F-key specific settings (only used when activation_mode: f_key)
    f_key:
      # Launch strength when pressing F key (1.5 = ~14-15 blocks upward)
      launch_strength: 1.5
```

When using `f_key` activation mode, this controls how high the player launches upward when activating.

***

## Default Configuration

<details>

<summary>Click to expand full default config.yml</summary>

```yaml
# Spawn Elytra Plugin by blaxk
# Plugin Version: 1.4
# Modrinth: https://modrinth.com/plugin/spawn-elytra

# ==========================================
# GLOBAL SETTINGS
# ==========================================

# Available languages: en, de, es, fr, pl
language: en

# Game mode restrictions
game_modes:
  disable_in_creative: true
  disable_in_adventure: false

# Fireworks settings
fireworks:
  disable_in_spawn_elytra: false

# Message settings
messages:
  show_press_to_boost: true
  show_boost_activated: true
  show_creative_disabled: false
  style: classic

# Visualization settings for /spawnelytra visualize command
visualization:
  vertical_range: 20
  pillar_vertical_range: 25
  update_frequency: 10
  particle_size: 2.0
  enhanced_particles: true

# Hunger consumption settings (global defaults, can be overridden per-world)
hunger_consumption:
  enabled: false
  mode: activation
  minimum_food_level: 0
  activation:
    hunger_cost: 1
  distance:
    blocks_per_point: 50.0
    hunger_cost: 1
  time:
    seconds_per_point: 30
    hunger_cost: 1

# ==========================================
# WORLD-SPECIFIC SETTINGS
# ==========================================

worlds:
  world:
    enabled: true
    activation_mode: double_jump
    radius: 100
    spawn_area:
      mode: auto
      area_type: circular
      x: 0
      y: 64
      z: 0
      x2: 0
      y2: 0
      z2: 0
    boost:
      enabled: true
      strength: 4
      direction: forward
      sound: ENTITY_BAT_TAKEOFF
    f_key:
      launch_strength: 1.5
```

</details>

***

### See Also

* [Commands](https://blaxk.gitbook.io/spawnelytra/commands) - Command reference
* [Permissions](https://blaxk.gitbook.io/spawnelytra/permissions) - Permission nodes
* [Languages](https://blaxk.gitbook.io/spawnelytra/languages) - Localization options
