Repository navigation
Releases
LiveMarket 0.6.0
LiveMarket 0.6.0
Player trade history — every successful trade is recorded, and players can look back at their own trading with /market history.
What's new
/market history [item] [page]— your past trades, newest first, 8 per page: date/time, side (BOUGHT/SOLD), amount, item, unit price and total (sell totals are after the fee). Filter by item (/market history WHEAT), page through them (/market history 2).- Every successful trade is recorded — buys and sells, from the command and from the GUI. Failed trades (not enough money, not enough items, full inventory, paused market) record nothing.
- Persists in both backends — history lives in
data.ymlundertrade-historyon the YAML backend, and in the newlm_tradestable on MySQL (included in the one-time migration fromdata.yml, so switching backends keeps your trades). The lastsettings.trade-history-entriestrades per player are kept (default 100). - Message keys merge on upgrade — upgrading servers keep their existing
messages.yml, so new message keys are now added to it automatically on enable (existing edits are never overwritten).
Verified
End-to-end on Paper 1.21.11 with Vault, EssentialsX and PlaceholderAPI, using a bot player and the built-in debug mode:
- YAML: 11 trades recorded with exact amounts and totals (buy 64 WHEAT @ 7.7661 = 497.03; sell 32 WHEAT @ 8 = 243.20; buy 4 DIAMOND @ 120.95 = 483.80); history list newest-first, item filter, pagination (8 per page), out-of-range page and unknown item handled; a failed trade leaves no record. All 11 trades survive a restart.
- MySQL: migration copies all 11 trades into
lm_tradeswith exact values; 11 more trades on MySQL land in the table (22 rows total); a restart restores all 22 from the database, oldest first-trade included. - Upgrading from a 0.5.0
messages.yml: the newhistory-*keys are merged in on enable (this was caught by testing — before the fix the history lines rendered as raw key names). - One environment quirk, not a plugin bug: on this VM Java's default dual-stack networking garbles the MySQL handshake (the sandbox IPv6 mesh), so the test server is launched with
-Djava.net.preferIPv4Stack=true; ordinary servers don't need it.
Install
Drop LiveMarket-0.6.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.5.0 keep working.
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.
LiveMarket 0.4.0
Crash-safe persistence, chart ranges, per-item volatility, and a trading pause.
What's new
- Crash-safe persistence —
data.ymlis now written atomically (temp file + atomic move), the previous file is kept asdata.yml.bak, and saves are sequenced so an older async snapshot can never overwrite a newer one. Ifdata.ymlis ever unreadable at startup, LiveMarket restores fromdata.yml.bakwith a console warning instead of silently resetting every price. - Chart ranges in the GUI — the item detail view has a clock button that cycles the price chart through the last 9, 25, or 50 recorded points; the sparkline follows the same range. Price decay now records a history point whenever it moves a price, so charts show the drift between trades too.
- Per-item volatility — any item in
config.ymlcan override the global pricing pressure with its ownpressure-kandmax-move. Make diamonds sluggish and wheat wild, per item. - Admin trading pause —
/market pauseand/market resumefreeze all buying and selling while leaving browsing and price checks open. Setsettings.trading-enabled: falseto start the server paused.
Verified
End-to-end on Paper 1.21.11 with Vault, EssentialsX and PlaceholderAPI, using a bot player and the built-in debug mode: global vs per-item pricing math, the GUI range button, pause blocking buys and sellall while price queries still answer, prices surviving a restart, and a deliberately corrupted data.yml restored from backup (WHEAT 5.0 and DIAMOND 120.24 recovered exactly).
Install
Drop LiveMarket-0.4.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.3.0 keep working; new options are documented in the bundled config.yml.
LiveMarket 0.3.0
PlaceholderAPI support.
- New
%livemarket_...%placeholders, registered only when PlaceholderAPI is present (soft dependency — the plugin runs fine without it):price_<item>,base_<item>,floor_<item>,ceiling_<item>,change_<item>(signed day change, e.g. +17.14%),trend_<item>(▲/▼/—),volume_<item>(units traded today),top_<n>_item,top_<n>_price,top_<n>_change, andcount. Item names are case-insensitive (%livemarket_price_wheat%); unknown items or ranks are left unparsed instead of returning a made-up value. - Verified end-to-end on Paper 1.21.11 + Vault + EssentialsX + PlaceholderAPI 2.12.3 with a bot player: every placeholder parsed to the exact live value before and after a trade moved the price (WHEAT 2.00 → 2.34). 25/25 checks passed.
LiveMarket 0.2.0
Modernization release — everything player-facing rebuilt, plus a built-in analysis mode.
Modern texts & commands
- All messages moved to MiniMessage (Adventure): gradient titles, icons, thousands separators, and clickable help that suggests commands. No legacy colour codes remain.
Polished GUI
- Framed shop front with a balance readout; item lore now shows live price, trend, day change and daily volume.
- Detail view adds the floor/ceiling range and a sparkline next to the pane chart; every buy/sell button shows its estimated total; clicks and trades play sounds.
Debug mode (new)
settings.debugin config.yml or/market debug on|off(admin). Every mechanism — pricing math, trade validation, Vault results, decay, alerts, GUI clicks, persistence, commands — writes one structured[LiveMarket-Debug]line per event to the server log, with every number needed to re-derive the result.
Verified on Paper 1.21.11 + Vault + EssentialsX with a bot player that turned debug on in-game and ran the full mechanism matrix against the debug log: formula-exact trades, floor/ceiling clamps, daily-volume guard dampening, fee math, all rejection paths charging nothing, sell-all, alerts firing on a crossing, GUI trades, and decay toward base prices.
Download LiveMarket-0.2.0.jar below and drop it into your server's plugins/ folder.
LiveMarket 0.1.0
First release of LiveMarket — a Paper 1.21.x plugin that turns a survival server's shop into a living market: prices move with supply and demand.
Highlights
- Dynamic pricing engine: saturating supply/demand formula with a per-trade impact cap, per-item floor/ceiling, decay back to base prices, a configurable sales fee, and a daily volume guard — bulk farming hits diminishing returns instead of printing money.
- Trading by commands and a chest GUI: category-grouped shop, per-item detail view with a price-history chart, and 1/8/32/64 buy/sell buttons.
- Price alerts per player (
/market alert <item> <above|below> <price>) that fire once in chat and persist across restarts. - Admin controls:
/market reload,/market setprice(logged),/market reset. - All economy movement goes through Vault; sells remove items before paying; state persists in
data.ymlwith asynchronous saves.
Requirements: Paper 1.21.x, Java 21, Vault + any Vault economy plugin (tested with EssentialsX).
Verified on Paper 1.21.11 with Vault + EssentialsX: clean load, GUI and command trading in both directions, prices moving within their floor/ceiling, alerts firing, and state surviving a restart.
Download LiveMarket-0.1.0.jar below and drop it into your server's plugins/ folder.