# 📁 Main Configuration

## Main Configuration

`config.yml` holds the server-wide settings. Almost everything here is also editable in game from /pduels editor > Settings, which is the safer route on a live server; this page is for when you would rather edit the file directly.

Run /pduels reload after editing, or /pduels reload menus if you only touched menu files.

> **Warning:**
Leave `product-license` alone. It is written by the plugin and identifies your purchase. See [Licensing](../../plugins/licensing.md).

## General

```yaml
notify-if-new-version: true
send-server-statistics: true
join-reminder: true
language: EN_US
debug: false
```

<table><thead><tr><th width="240">Option</th><th>Description</th></tr></thead><tbody><tr><td>notify-if-new-version</td><td>Tells players with <code>phoenixduels.admin</code> when a newer version is available, shortly after they join.</td></tr><tr><td>send-server-statistics</td><td>Lite only. Sends the server version, software, join domains and player count to our servers so the server shows on the website. See <a href="../../plugins/licensing.md#server-statistics">Server Statistics</a>.</td></tr><tr><td>join-reminder</td><td>Shows the Lite version's welcome message on join. Has no effect on Premium.</td></tr><tr><td>language</td><td>Which translation file the plugin loads. Lines missing from it fall back to English. See <a href="../languages.md">Languages & Translations</a>.</td></tr><tr><td>debug</td><td>Adds verbose logging to the console. Leave it off unless support asks for it.</td></tr></tbody></table>

## Database

The available types are sqlite and mysql. SQLite needs no setup and is fine for a single server; MySQL is a Premium feature.

```yaml
database:
  type: sqlite
  address: localhost
  name: phoenixduels_db
  port: 3306
  username: phoenixuser
  password: phoenixpassword
  table-prefix: ''
  hikari:
    maximumPoolSize: 20
    minimumIdle: 5
    idleTimeout: 600000
    maxLifetime: 1800000
    connectionTimeout: 30000
    fetch-timeout: 5000
```

**table-prefix** is put in front of every table name. It is what lets two separate Phoenix Duels installations share one MySQL database without colliding. Set it before the first start, because changing it later makes the plugin create a fresh, empty set of tables and your existing data is left behind under the old names.

The **hikari** block tunes the connection pool and only applies to MySQL. The defaults suit most servers. `maximumPoolSize` is the usual thing to raise on a large network, and `fetch-timeout` is how long a query may take before the plugin gives up on it.

On MySQL and MariaDB the plugin creates its tables in the utf8mb4 character set, so names, lore and messages can hold emoji and any symbol. Tables made in another character set by an older version are converted once at startup, with one console line per table. If a table cannot be converted, a console warning names it.

See [What tables does the plugin create in my database?](../../plugins/questions-and-answers/README.md#what-tables-does-the-plugin-create-in-my-database) for the tables that get created.

## Worlds

Restricts the plugin to certain worlds, which is useful if you run Multiverse and only want duels in a dedicated world.

```yaml
worlds:
  should-use: DISABLED_WORLDS
  enabled: []
  disabled:
  - world_nether
  allow-challenges-from-disabled-worlds: false
```

Valid options for `should-use` are ENABLED\_WORLDS and DISABLED\_WORLDS. With `ENABLED_WORLDS`, only the worlds in the `enabled` list are used and everything else is ignored. With `DISABLED_WORLDS`, every world is used except the ones in `disabled`.

`allow-challenges-from-disabled-worlds` (Premium, off by default) lets players in a filtered-out world still send and accept duels, challenge parties and join queues. They are taken to the arena when the match starts and brought back to where they were afterwards. Lobby items and the lobby scoreboard stay off in those worlds either way. You can also change it with **Allow Challenges From Disabled Worlds** in `/pd editor` → Settings → Plugin → Worlds.

## Allowed Types

Removes an entire category of play. To run a ranked-only server, leave `RANKED` as the only entry.

```yaml
allowed-types:
- CHALLENGE
- UNRANKED
- RANKED
```

## Match

Every option below is documented in detail, with screenshots, on the [Match Settings](../../features/settings/match/README.md) page. The keys are listed here for editing the file directly.

```yaml
match:
  default-finishing-seconds: 5
  extended-finishing-seconds: 60
  maximum-allowed-rounds: 10
  rounds-format: FIRST_TO
  restore-last-inventory: true
  require-empty-inventory: false
  launch-fireworks-for-winner: true
  spectator-engine: DEFAULT
  tablist-scoping-enabled: true
  spectator-tablist-prefix: '&e[S] '
  prevent-same-ip-ranked: false
  sneak-to-ready: false
  save-countdown-kit-layout: true
  queue-match-found:
    enabled: false
    delay-seconds: 2
    sound: ENTITY_PLAYER_LEVELUP;1.0;1.0
  prevent-party-queueing: false
  floor-kill: true
  reconnect:
    enabled: true
    window-seconds: 60
    combat-log-seconds: 5
    max-per-match: 1
```

<table><thead><tr><th width="290">Option</th><th>Description</th></tr></thead><tbody><tr><td>default-finishing-seconds</td><td>How long players stay in the arena after a match ends.</td></tr><tr><td>extended-finishing-seconds</td><td>Used instead of the default when the ending needs more time on screen, such as a betting payout.</td></tr><tr><td>maximum-allowed-rounds</td><td>The highest rounds value a player may pick for a custom match.</td></tr><tr><td>rounds-format</td><td>FIRST_TO makes the rounds value the number of round wins needed to clinch the match. BEST_OF makes it the total number of rounds played, with the majority deciding the winner.</td></tr><tr><td>restore-last-inventory</td><td>Saves the player's inventory before a match and gives it back afterwards.</td></tr><tr><td>require-empty-inventory</td><td>Refuses a duel invitation unless the player's inventory is empty.</td></tr><tr><td>launch-fireworks-for-winner</td><td>Fires fireworks around the winner.</td></tr><tr><td>spectator-engine</td><td>DEFAULT uses real spectator gamemode. LEGACY keeps the player in survival as an invisible ghost. Lite is always LEGACY.</td></tr><tr><td>tablist-scoping-enabled</td><td>Limits the tab list of players in a match to that arena.</td></tr><tr><td>spectator-tablist-prefix</td><td>Shown before a spectator's name in the tab list.</td></tr><tr><td>prevent-same-ip-ranked</td><td>Stops ranked matchmaking pairing players who share an IP address.</td></tr><tr><td>sneak-to-ready</td><td>Ends the pre-fight countdown as soon as everyone has sneaked.</td></tr><tr><td>save-countdown-kit-layout</td><td>Saves the way a player rearranges a premade kit during the pre-fight countdown as their layout for that kit. Only for kits that allow custom layouts. Premium only, on by default.</td></tr><tr><td>queue-match-found</td><td>Shows a MATCH FOUND title and plays <code>sound</code> (written as <code>NAME;volume;pitch</code>) to players matched by the queue, then teleports them after <code>delay-seconds</code>. Queue matches only. Premium only, off by default.</td></tr><tr><td>prevent-party-queueing</td><td>Stops parties queueing for Unranked and Ranked.</td></tr><tr><td>floor-kill</td><td>Instantly eliminates a player who lands on the arena floor.</td></tr><tr><td>reconnect</td><td>Holds the spot of a player who disconnects during a round and pauses the round until they log back in. <code>window-seconds</code> is how long the round waits, <code>combat-log-seconds</code> denies the window to a player hit by another player that recently, and <code>max-per-match</code> caps how often one player can use it in a match. Not used in modes where players fight with their own inventory and drop it on death.</td></tr></tbody></table>

### Whitelist / Blacklist Commands

Controls which commands players may run during a match. To block flying mid-duel, for example:

```yaml
match:
  commands:
    mode: BLACKLIST
    whitelist-commands: []
    blacklist-commands:
    - fly
    - heal
```

Valid options for `mode` are BLACKLIST and WHITELIST. Only the list matching the chosen mode is read.

### Nametags and Chat

```yaml
match:
  custom-nametags:
    enabled: true
    prefix: '%color%[%team%] '
  chat:
    enabled: true
    scope: TEAM
    format: '&8[&a&lArena&8] &e%player%&8: &f%message%'
```

`chat.scope` takes TEAM, where only teammates see the message, or ARENA, where everyone in the match does. See [Custom Nametags](../../features/settings/match/README.md#custom-nametags) and [Team Chat](../../features/settings/match/README.md#team-chat).

## Party

```yaml
party:
  require-permission-to-create: false
  default-slots: 5
  chat-format: '&7[Party] &f%player%&7: &f%message%'
  permission-slots:
    '0':
      amount: 10
      permission: phoenixduels.partymembers.10
    '1':
      amount: 15
      permission: phoenixduels.partymembers.15
```

Covered in full on the [Party](../../features/party/) page.

## Betting

```yaml
betting:
  money-enabled: true
  items-enabled: true
items-betting:
  max-items-per-player: 10
```

Money betting requires Vault. See [Betting](../../features/betting.md).

## Ranked Restriction

Keeps players out of Ranked until they have won a number of Unranked games.

```yaml
ranked:
  unranked-requirement:
    enabled: false
    amount: 10
    bypass-permission: phoenixduels.ranked.bypass
```

## Matchmaking (Premium)

```yaml
matchmaking:
  ping-ranges:
  - 50
  - 100
  - 150
  - 200
```

The steps players cycle through with the [Ping Range](../../features/player-settings.md#ping-range-premium) setting, in milliseconds. Unrestricted is always the first step and is not listed here.

## Invitations

```yaml
invitation-expiration-time: 60
```

How many seconds a duel or party invitation stays valid before it lapses.

## Performance

```yaml
performance:
  internal-pool-size: 5
cache:
  use-memory-for-performance: true
stats-update-interval: 60
leaderboard-fetch-interval: 60
regeneration:
  internal:
    blocks-per-cycle: 4096
    max-chunks-per-cycle: 16
```

<table><thead><tr><th width="300">Option</th><th>Description</th></tr></thead><tbody><tr><td>performance.internal-pool-size</td><td>How many threads the plugin uses for its background work, such as database reads.</td></tr><tr><td>cache.use-memory-for-performance</td><td>Caches components in memory instead of rebuilding them. Recommended, but you can turn it off on a very low-memory server.</td></tr><tr><td>stats-update-interval</td><td>Seconds between refreshes of cached player statistics.</td></tr><tr><td>leaderboard-fetch-interval</td><td>Seconds between leaderboard refreshes. Raise it if leaderboard queries are heavy; lower it if your holograms feel stale.</td></tr><tr><td>regeneration.internal.blocks-per-cycle</td><td>How many blocks the internal regeneration engine restores per tick. Lower this if regeneration causes lag spikes.</td></tr><tr><td>regeneration.internal.max-chunks-per-cycle</td><td>How many chunks it may touch per tick. Lower this alongside the option above.</td></tr></tbody></table>

> **Info:**
The two `regeneration.internal` values are the ones to change if [regeneration is causing lag](../../plugins/questions-and-answers/README.md#why-regeneration-causes-lag-to-my-server). Halving them makes regeneration slower but much smoother.

## Commands

Every command can be disabled or renamed. See the [Commands](../../plugins/commands.md) page for the full table of keys and defaults.

```yaml
commands:
  require-permission: false
  party:
    enabled: true
    alternative: match
```

## Bedrock

How Bedrock players joining through Geyser see the menus. See the [GeyserMC (Bedrock)](../geysermc-bedrock.md) page for every option.

## Other Files

`config.yml` is not the only file. The plugin also writes:

* [Map Configuration](map-configuration.md) and [Mode Configuration](mode-configuration.md) - one file per map and per mode.
* [Feature Toggles](README.md#feature-toggles) - `feature_toggles.yml`.
* [Templates](README.md#templates) - `templates.yml`, the default scoreboard.
* [Spectator Hotbar](README.md#spectator-hotbar) - `spectator_hotbar.yml`.
* `elo.yml` - the elo settings, covered on the [Elo](../../features/elo.md) page.
* `sounds.yml` - covered on [Customize Sounds](../customize-sounds.md).
* `replay.yml` and `discord.yml` - Premium only, covered on [Statistics](../../features/statistics.md) and [Discord Match Log](../../features/discord-match-log.md).

## Translations

All player-facing text lives in the translation file for your chosen language, under `translations/`. Chat messages, titles, menu text and holograms are all edited there rather than in `config.yml`.

Source: https://www.phoenixplugins.com/docs/phoenix-duels/configurations/configuration-files/main-configuration