Storage
Player data lives in SQLite by default, with MySQL as the option for a network.
What is stored
- Job levels, xp, and prestige counts
- Farmpoint balances
- Monthly ranking points, this month and last
- Unclaimed level rewards and staged ranking rewards
SQLite
storage:
type: sqlite
sqlite:
file: "data.db"
One file in plugins/CoreJobs. Nothing to install and nothing to set up.
Copy data.db while the server is stopped. That is the whole save.
MySQL
storage:
type: mysql
mysql:
host: "localhost"
port: 3306
database: "corejobs"
username: "root"
password: ""
properties: "useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=utf8"
table-prefix: "corejobs_"
| Key | What it does |
|---|---|
host and port |
Where the server is |
database |
Must exist already, the plugin creates tables but not the database |
username and password |
An account with rights on that database |
properties |
Extra connection flags joined with &. The defaults suit a normal MySQL 8, leave them alone unless your host tells you otherwise |
table-prefix |
Keeps CoreJobs tables apart from other plugins sharing the database |
Changing type points the plugin at an empty store. Levels and farmpoints do not migrate themselves. Decide before your players start earning, or plan to move the rows yourself.
Sharing data across servers
Point every server at the same MySQL database with the same table-prefix. Job levels and farmpoints then follow the player between servers.
Data is loaded on join and written on leave. A player logged into two servers at once on the same database can have one session overwrite the other.
Cached reads
Leaderboards and placeholders read a cached copy, not the database. A scoreboard on every player costs the same as a scoreboard on one.
The copy is rebuilt every leaderboards.refresh-seconds, and sooner when a player levels or prestiges, with leaderboards.min-delay-seconds as the shortest gap between two of those early rebuilds. A level up also writes that player’s row out straight away, so the rebuild has the new level to read.