Repository navigation
LiveMarket 0.5.0
LiveMarket 0.5.0
MySQL/MariaDB storage backend (optional) — one shared market across every server that points at the same database.
What's new
- MySQL storage — set
storage.type: mysqlinconfig.ymland pointstorage.mysqlat a MySQL or MariaDB database. The driver (Connector/J 8.4.0) is shaded into the plugin jar, so there is nothing extra to install on the server, and the three tables (lm_meta,lm_prices,lm_alerts) are created automatically on first start. - One-time migration — when the tables are empty but a
data.ymlalready exists, its prices, history and alerts are copied into the database once, so switching backends never loses market state. - Fallback, not failure — if the database cannot be reached at startup, LiveMarket logs an error and keeps running on
data.ymlinstead of refusing to start. A failed save logs a warning and retries on the next scheduled save. - Storage refactor — persistence is now a
Storageinterface withYamlStore(the crash-safedata.ymlbackend, behaviour unchanged) andMySqlStorebackends, sharing one in-memory alert implementation (AbstractStore). Existingconfig.ymlanddata.ymlfiles keep working;storage.typedefaults toyaml.
Verified
End-to-end on Paper 1.21.11 with Vault, EssentialsX and PlaceholderAPI against a real MariaDB 10.11 server, using a bot player and the built-in debug mode: exact data.yml migration, formula-exact trades on MySQL, restart restores from MySQL, a stopped database falls back to data.yml with a clear error while trades keep working, and MySQL resumes with its own state afterwards. The YAML backend was regression-tested in the same session.
Install
Drop LiveMarket-0.5.0.jar into your server's plugins/ folder and restart. Requires Paper 1.21.x, Vault, and any Vault economy plugin (e.g. EssentialsX). PlaceholderAPI is optional. Existing config.yml / data.yml from 0.4.0 keep working; new options are documented in the bundled config.yml. For MySQL, create an empty database and a user first (CREATE DATABASE livemarket;), then set storage.type: mysql.