-
Notifications
You must be signed in to change notification settings - Fork 0
Database Setup
EndlessCoinflip supports three storage types. Set your choice in config.yml:
storage:
type: FILE # FILE, SQLITE, or MYSQLNo setup required. Player data is saved as individual YAML files in plugins/EndlessCoinflip/playerdata/.
Best for: small servers or those who want simple, human-readable data files.
A single-file database stored locally on your server. No external database server needed.
storage:
type: SQLITEThe database file is created automatically at plugins/EndlessCoinflip/data.db.
Best for: medium servers that want better performance than flat files without the complexity of MySQL.
A full external database server. Suitable for networks or servers that already run MySQL.
storage:
type: MYSQL
mysql:
host: localhost
port: 3306
database: endlesscoinflip
username: root
password: yourpassword✅ EndlessCoinflip will create the database automatically if it doesn't already exist — no manual setup needed beyond having a MySQL server running.
Best for: large servers or networks sharing data across multiple instances.
When you change the type in config and run /cf reload (or restart), EndlessCoinflip will automatically:
- Read all existing data from the current storage
- Write it into the new storage
- Rename the old storage as a backup (never deleted)
For example, switching from FILE to SQLite will rename
playerdata/toplayerdata_backup/and import everything intodata.db.
⚠ Always keep your own backups before switching storage types, especially on production servers.
SQLite crashes on startup Make sure you're running Java 21+. Some older Java versions have issues with the SQLite driver.
MySQL connection refused
- Check your host, port, username and password are correct
- Make sure your MySQL server allows remote connections if not running locally
- Check your firewall isn't blocking port 3306