Storage
How and where the plugin saves tool backups and lifetime totals.
The plugin saves two kinds of data in a database:
- A backup of every tool's state.
- Each player's lifetime totals, used for the leaderboard and stats.
Both back ends save the same data. You pick one with a single setting.
Pick a back end
Set storage.type in config.yml.
The default. It writes to a local file inside the plugin folder. No setup needed. This is the right choice for most single servers.
storage:
type: sqliteUses an external MySQL database. Fill in the storage.mysql block with your host, port, database, username, and password. Use this when you run several servers that should share data, or when you already run MySQL.
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: zevolutivetools
username: root
password: ""Why a tool keeps its progress
A tool's state lives on the item itself. So it survives death, drops, trades, and restarts on its own. On top of that, the plugin mirrors each tool to the database. The mirror is what lets an admin run /et restore to rebuild a tool a player lost, with the same id, balance, and upgrades.
Performance
Writes are batched and run off the main thread. A burst of currency or block gains is grouped and written once after a short delay, not on every single action. So heavy mining does not turn into heavy database traffic. A quit, a world save, and plugin shutdown each force a final write, so nothing is lost.
If you switch from SQLite to MySQL on a live server, tools keep working because their state is on the item. But their database backups and lifetime totals start fresh in the new database. Plan the switch during a quiet time.