-
Notifications
You must be signed in to change notification settings - Fork 0
Database
SpContentQuests uses a database to persist player quest progress. It supports two database backends: SQLite (default) and MySQL.
By default, the plugin uses SQLite. The database file is stored at:
plugins/SpContentQuests/database.db
No configuration is needed — it works out of the box. Player data is automatically saved at the configured interval and when players quit the server.
To use MySQL, enable it in config.yml:
mysql-settings:
enabled: true
hostname: 192.168.1.100
port: 3306
database-name: spcontentquests
user-name: myuser
user-password: mypassword
use-ssl: false
connection-pool-size: 3| Setting | Default | Description |
|---|---|---|
enabled |
false |
Set to true to use MySQL instead of SQLite |
hostname |
0.0.0.0 |
MySQL server address |
port |
0 |
MySQL server port |
database-name |
'' |
Name of the database to use |
user-name |
'' |
MySQL username |
user-password |
'' |
MySQL password |
use-ssl |
false |
Enable SSL encryption for the connection |
connection-pool-size |
3 |
Maximum connections in the HikariCP pool |
Important: If you switch from SQLite to MySQL (or vice versa), existing data will not be automatically transferred. You'll need to migrate it manually.
Player data is saved automatically at the interval configured in config.yml:
auto-save-interval: 5 # Minutes between automatic database savesData is also saved whenever a player quits the server, ensuring minimal data loss in case of a crash.
The database stores:
- Each player's UUID
- Per-quest completion status (ongoing, completed, claimed)
- Per-quest objective progress values
- Per-category completion state
You can manage player data in-game using admin commands:
| Command | Description |
|---|---|
/spcontentquests resetall <player|all> |
Reset all progress for a player or everyone |
/spcontentquests resetcategory <category> <player|all> |
Reset progress in a specific category |
/spcontentquests quest reset <quest> <player> |
Reset a single quest |
Note:
resetall allandresetcategory <category> allcan only be run from console.