> For the complete documentation index, see [llms.txt](https://docs.ohalee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ohalee.com/products/modern-bedwars/configuration.md).

# Configuration

Every gameplay-affecting value ships as an editable default and is **not** recompiled to change. Configuration is split by module.

## Service (`application.properties`)

The standalone service reads a plain `application.properties` next to its jar:

```properties
bedwars.service.redis.host=<redis-host>
bedwars.service.redis.port=6379
bedwars.service.redis.password=<redis-password>
bedwars.service.redis.database=0

bedwars.service.maria.host=<mariadb-host>
bedwars.service.maria.port=3306
bedwars.service.maria.database=bedwars
bedwars.service.maria.username=bedwars
bedwars.service.maria.password=<mariadb-password>

bedwars.service.server.max-match-per-server=50
# Online-player recompute interval for the server rancher (ms).
bedwars.service.server.online-update-interval-ms=2000

# Queue tuning (all optional — defaults shown).
bedwars.service.queue.task-interval-ms=50
bedwars.service.queue.redis-update-interval-ms=2500
bedwars.service.queue.max-null-count=15
bedwars.service.queue.timeout-ms=5000
bedwars.service.queue.idle-transition-delay-ms=1000
bedwars.service.queue.play-again-cooldown-seconds=3
bedwars.service.queue.play-again-cache-size=10000

logging.level.com.ohalee.bedwars=info
logging.file.name=./logs/bedwars-service.log
```

### Advanced — Redis key TTLs (any node)

The shared platform layer keeps a few Redis TTLs that rarely need changing. They're tunable on **any** node via JVM system properties (defaults, in seconds):

```
-Dbedwars.platform.redis.rejoin-ttl-seconds=300
-Dbedwars.platform.redis.match-ttl-seconds=10
-Dbedwars.platform.redis.party-invite-ttl-seconds=60
-Dbedwars.platform.redis.player-load-ttl-seconds=20
```

## Proxy (`plugins/bedwars-proxy/`)

Three JSON files:

**`mariadb.json`** and **`redis.json`** — connection details (host, port, username, password, database, pool sizes).

**`config.json`** — server-name prefixes. These are how the proxy recognises lobby vs game servers and where it returns players on leave. Defaults:

```json
{
  "bedwarsPrefix": "bedwars_",
  "lobbyPrefix": "bedwars_lobby_",
  "gamePrefix": "bedwars_game_",
  "hubPrefix": "lobby_",
  "defaultLobbyServer": "bedwars_lobby_1"
}
```

Register matching server names in Velocity's `velocity.toml`; each game server's own `server-id` must use the same name.

## Lobby (`plugins/bedwars-lobby/config.yml`)

```yaml
# Must be unique per lobby node, e.g. bedwars_lobby_1, _2, ...
server-id: "bedwars_lobby_1"

database:
  mariadb:
    host: "<mariadb-host>"
    port: 3306
    username: "bedwars"
    password: "<mariadb-password>"
    database-name: "bedwars"
    pool-name: "bedwars-pool"
    minimum-pool-size: 10
    maximum-pool-size: 10
  redis:
    host: "<redis-host>"
    port: 6379
    password: "<redis-password>"
    database: 0
    clientName: "bedwars-redis"
    minimumPoolSize: 10
    maximumPoolSize: 10
```

Lobby GUI layout (slot positions, page size, strings) lives in the lobby's own config and is de-hardcoded — reskinning doesn't require a rebuild.

## Game (`plugins/bedwars/`)

`config.yml` holds the `server-id` (must match `velocity.toml` and start with the proxy's `gamePrefix`) and the same database block as the lobby.

Everything gameplay-affecting is in `defaults/`. Edit only the values you want to override:

| File             | Governs                                                                                                                                                       |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `game.yml`       | Match timers/sizes, combat rules, egg-bridge, fireball physics, sponge absorption, magic-milk cooldown, trap-alarm timing, cosmetic tuning toggle/multipliers |
| `shop.yml`       | Shop GUI layout + item prices per game mode + team upgrade tiers/prices                                                                                       |
| `generators.yml` | Spawn rate/cap/amount per resource, mode and level                                                                                                            |
| `upgrades.yml`   | Upgrade & trap GUI layout (slots, cards, filler)                                                                                                              |
| `traps.yml`      | Trap catalogue, effects, targets + GUI layout                                                                                                                 |
| `cosmetics.yml`  | Cosmetic catalogue (name, rarity, price, permission) + GUI layout/pagination                                                                                  |
| `scoreboard.yml` | Sidebar layout + refresh rate                                                                                                                                 |
| `hotbar.yml`     | Hotbar layout per game phase                                                                                                                                  |
| `items.yml`      | Special-item definitions                                                                                                                                      |
| `events.yml`     | Game event timeline (diamond II, generator destroy, etc.)                                                                                                     |

{% hint style="warning" %}
The plugins do **not** auto-merge missing keys on upgrade. After replacing a jar, skim the shipped defaults against your edited copy and copy in any **new** keys with their defaults — otherwise you can't tweak the new key until you add it.
{% endhint %}
