Storage & Data
PhantomBans saves every punishment, note, report, and appeal to a database. You choose which one.
Pick a backend
Set database.type in config.yml to one of sqlite, mysql, or mariadb.
SQLite (default)
SQLite stores everything in a single file at plugins/PhantomBans/data.db. It needs no setup and is a
fine choice for a single server.
database:
type: sqliteThe network settings (host, port, and so on) are ignored when using SQLite.
Connection settings
| Key | What it controls |
|---|---|
host | The database server address. |
port | The database server port. |
name | The database (schema) name. |
username | The login user. |
password | The login password. Leave "" for none. |
pool-size | How many connections to keep open. Higher means more concurrency and more memory. |
connection-timeout | How long to wait (ms) for a free connection before failing. |
Performance and caching
To cut database hits, PhantomBans can cache recent lookups in memory. The defaults suit most servers.
performance:
cache-punishments: true
cache-duration: 300 # seconds, minimum 5
async-lookup-timeout: 5000 # ms, minimum 1000Lookups run off the main thread, so checking a player’s history does not lag the server.
Exporting data
You can export punishment data with:
/phantombans exportMoving from SQLite to MySQL later is possible, but plan it during a quiet time and back up your data first. Ask in the Discord if you want a hand.
Always back up your database before big changes, server moves, or major updates.