Storage

TradeSMP saves each player’s Trade Level so it survives restarts and relogs. You get two choices for where that data lives.

SQLite (default)

Zero setup. On first boot TradeSMP creates a database.db file in its own folder and uses that. This is the right choice for most servers.

plugins/TradeSMP/database.db

MySQL (optional)

If you already run a MySQL server and want the data there, switch to it in config.yml:

storage:
  type: mysql
  mysql:
    host: localhost
    port: 3306
    database: tradesmp
    username: root
    password: ""

Make the database first

The plugin creates its own table, but not the database itself. Create the tradesmp database in MySQL before starting, or point database at one that already exists.

Switching storage needs a full restart

Changing storage.type only takes effect after a complete server restart. A /tradesmp reload will not rebuild the connection.

The drivers

TradeSMP does not pack the database driver or the connection pool inside its jar, which keeps the download small. The server downloads them on its own the first time it boots, so you need an internet connection for that one start. After that it runs offline.

What gets stored

For each player, TradeSMP keeps a small record:

FieldMeaning
Player IDThe player’s unique ID.
LevelTheir Trade Level, -3 to +3.
Last locate useWhen they last used the village locator, for the cooldown.
Last updatedWhen the record last changed.

The emerald lightning hit streaks are not saved. They live in memory only and clear on restart, since they are short lived combat state. See Buffs.