database.yml
SQLite or MySQL storage and cross-server network block.
Path: plugins/MineDuels/database.yml
Reload: merged on /md reload
Restart required: storage.type, connection fields, cross-server.enabled
What it supports
- SQLite file (
data.db) for single-server setups - MySQL/MariaDB with Hikari pool (
mysql.*) - Periodic autosave interval
- Cross-server block (Velocity + Redis) when the paid add-on is installed and enabled
What it does not do
- Does not run Redis or MySQL for you
- Cross-server queues without MySQL (
storage.type: mysql) - Switching SQLite → MySQL without restart and data migration planning
performance
performance:
async-displays: true| Key | Default | Purpose |
|---|---|---|
async-displays | true | When enabled, MineDuels resolves scoreboard, tab, and nametag text on a dedicated display thread where the platform allows it |
What async displays change
MineDuels refreshes UI from YAML timers (scoreboard.yml, tab.yml, nametags.yml → update-ticks) and from events (match state, sneak, damage, etc.).
With async-displays: true:
- Placeholder parsing, group selection, and line building for sidebar/tab/nametag text can run off the main thread.
- Work is scheduled back to the server thread when a visible change must be applied (sidebar packets, tab list entries, hologram nametag packets).
With async-displays: false, the same work runs on the main thread during each refresh. Use this only when debugging a display bug; busy hubs should leave it true.
What async displays do not fix
- Arena paste, reset, and player teleports into the grid world (chunk loading).
- Queue matcher ticks and match lifecycle.
- PlaceholderAPI or LuckPerms cost when caches expire (
nametags.yml→placeholder-cache-seconds). /md reload(reload still rebuilds all display configs on the main thread).
Tuning display intervals and nametag caches: Performance and Spark.
storage
storage:
type: sqlite # or mysql
sqlite-file: data.db
mysql:
host: localhost
port: 3306
database: mineduels
username: mineduels
password: ''
pool-size: 6
autosave-minutes: 5On a fresh install username is mineduels. Create that user in MySQL or MariaDB with rights on the mineduels database only, and do not run the plugin as root. A database.yml from an older version keeps the value it has. When the key is missing the plugin falls back to root, so set it explicitly.
CREATE DATABASE mineduels CHARACTER SET utf8mb4;
CREATE USER 'mineduels'@'%' IDENTIFIED BY 'a-long-random-password';
GRANT ALL PRIVILEGES ON mineduels.* TO 'mineduels'@'%';Use 'mineduels'@'10.0.0.%' or the host of your servers instead of % when you can.
Supports: First-start download of JDBC drivers from Maven Central (server needs HTTPS).
Does not: Encrypt passwords in the file; protect the file on disk.
Example MySQL:
storage:
type: mysql
mysql:
host: db.example.com
database: mineduels
username: mineduels
password: 'change-me'
pool-size: 10cross-server
cross-server:
enabled: false
server-name: lobby-1
role: lobby # lobby | game
redis:
host: localhost
port: 6379
password: ""
database: 0
global-chat: false
chat-server-name: true
assign-timeout-seconds: 30
party-away-minutes: 30chat-server-name: false removes the [server] prefix from chat of other servers. See Global chat.
| Role | In short |
|---|---|
lobby | Hub - queue, UI, matchmaker; players come back here after matches |
game | Runs assigned matches; needs arena copies for hosted kits |
server-name must match velocity.toml, not matchmaking.yml → queue.server-name (that is only action bar text).
Supports: Global queues on lobby nodes, assigning matches to game nodes (add-on JAR).
Does not: Work with storage.type: sqlite. Each node needs the same MySQL database and unique server-name matching Velocity.
Explain every term: Roles and common terms. Setup: Cross-Server (paid add-on).