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

# Configuration

NetworkManager configurations are managed via `config.yml` files. The structure differs depending on whether the plugin is running in **Proxy Mode** (Velocity/BungeeCord) or **Backend Mode** (Spigot/Paper).

***

## 1. Proxy Configuration (`config.yml`)

The primary configuration file on the proxy server is generated at `plugins/NetworkManager/config.yml`.

### Network Settings

Configure overall ping rates, capacity, and check-intervals for the proxy network:

```yaml
network:
  # How often (in seconds) to check server status
  server_ping_rate: 600

  # How often (in seconds) to dump player playtime/history data to the database
  player_data_dump_time: 60

  # Maximum number of ping attempts before marking a rebooting server as offline
  max_reboot_pings: 10

  # Interval (in seconds) between reboot ping attempts
  reboot_ping_interval: 30

  # Max players allowed on the network concurrently (0 = unlimited)
  max_players: 100
```

| Setting                 | Description                                                                   | Default |
| ----------------------- | ----------------------------------------------------------------------------- | ------- |
| `server_ping_rate`      | Frequency of network-wide server health checks.                               | `600`   |
| `player_data_dump_time` | Database save interval for playtime and sessions (processed via DataManager). | `60`    |
| `max_reboot_pings`      | Re-check limits before assuming a rebooting server failed to start.           | `10`    |
| `reboot_ping_interval`  | Wait time between reboot verification pings.                                  | `30`    |
| `max_players`           | Global network player limit.                                                  | `100`   |

***

### Web Dashboard Settings

Settings for the REST API and the embedded web panel server:

```yaml
web:
  # Enable the web server on the proxy
  enabled: false

  # Port to run the web panel and REST API on
  port: 8080

  # Host address to bind the web server to (0.0.0.0 binds to all interfaces)
  host: "0.0.0.0"

  # Password used to log in to the web panel
  password: "changeme"

  # API key used for external applications and standalone panel authentication
  # Automatically generated on first startup if left empty
  api_key: "abc123yourkeyhere..."
```

{% hint style="danger" %}
**Change the default password immediately** before enabling the web server. For security, run behind a reverse proxy with SSL/HTTPS enabled.
{% endhint %}

***

### Maintenance Mode Settings

Controls player entry restrictions and MOTD overlays when maintenance is enabled:

```yaml
maintenance:
  # Enable network-wide maintenance restrictions
  enabled: false

  # MOTD displayed to players in the server list during maintenance
  motd: "&cMaintenance in progress..."

  # Block all players from joining if they are not in the bypass list
  prevent_join: false

  # List of player usernames or UUIDs allowed to bypass maintenance restrictions
  bypass:
    - "Notch"
    - "Dinnerbone"
```

***

### Server Definitions

Every backend Spigot/Paper server on your network must be registered under `servers`.

```yaml
servers:
  hub-1:
    type: HUB
    max_players: 20
    server_id: "hub-1"

  lobby-bedwars:
    type: LOBBY
    max_players: 50
    server_id: "lbw-1"
    game_name: "BedWars"

  game-bedwars-1:
    type: GAME
    max_players: 8
    server_id: "bw-01"
    game_name: "BedWars"
    game_data: "t:8,p:1"
    can_rejoin: true
```

#### Server Types

* **`HUB`** — Main entry lobbies. Players are directed here on first join or when using `/hub`.
* **`LOBBY`** — Game lobbies (e.g., waiting areas for BedWars, SkyWars).
* **`GAME`** — Active match servers. Keeps track of game states (IDLE, WAITING, RUNNING, ENDING, STOPPING).
* **`OTHER`** — Miscellaneous servers (e.g., Creative, Survival) outside of matchmaking.

***

### GUI Menus (Proxy Config)

NetworkManager allows you to define custom items in Bukkit GUIs served via the proxy:

```yaml
gui:
  enabled: true
  main:
    open_command: games
    title: "&x&6&8&0&0&f&f&lGames"
    size: 5
    empty: null
    buttons:
      '11':
        item: FIREWORK_ROCKET
        name: "&x&6&8&0&0&f&f&lParty Games"
        action: "open partygames"
```

#### Supported Button Actions

* `open <menu>` — Opens another menu configuration (e.g., `open partygames`).
* `to hub` — Teleports the player to the best available HUB server.
* `to lobby <name>` — Teleports the player to the best lobby for the specified game.
* `to game <game> <data>` — Queues the player for an active game matching the game name and metadata.
* `to server <server_id>` — Teleports the player directly to a specific server.
* `command <cmd>` — Forces the player to run an in-game command.
* `bungee_command <cmd>` — Executes a command on the proxy console.
* `null <message>` — Sends a private chat message to the player.

***

## 2. Backend Spigot/Paper Configuration (`config.yml`)

When running the JAR on a backend server, the configuration file is generated at `plugins/NetworkManager/config.yml`. It focuses on server state tracking and Bukkit inventory styles.

### Game State MOTD Configurations

Backend servers report their status to the proxy via plugin messaging. You can map server states to specific MOTD prefixes (often parsed by pinger systems):

```yaml
motd:
  # Enable dynamic MOTD updates based on game state
  isFromEvent: true
  
  # Default MOTD formats for each server state
  none: "No State"
  idle: "Waiting for players..."
  waiting: "Starting soon..."
  running: "Game in progress"
  ending: "Game over! Cleaning up..."
  stopping: "Server restarting..."
```

### In-Game Inventory Settings

Customize how servers appear inside `/hubs` or `/games` GUI menus:

```yaml
inventory:
  # Automatically clear player inventory on hub join
  clear_inventory: false

  # Custom display materials and naming templates for menus
  hub:
    title: "Select Hub"
    offline:
      material: RED_STAINED_GLASS_PANE
      name: "&cHub {name} (Offline)"
      lore:
        - "&7Status: &cOffline"
    online:
      material: GREEN_STAINED_GLASS_PANE
      name: "&aHub {name}"
      lore:
        - "&7Players: &e{players}/{max_players}"
        - "&eClick to connect!"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mipcraft.eu/network-manager/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
