Skip to content

Releases

LiveMarket 0.6.0

Choose a tag to compare

@rconpilot rconpilot released this 28 Nov 17:09
5e8ba54

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.yml under trade-history on the YAML backend, and in the new lm_trades table on MySQL (included in the one-time migration from data.yml, so switching backends keeps your trades). The last settings.trade-history-entries trades 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_trades with 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 new history-* 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

Choose a tag to compare

@rconpilot rconpilot released this 21 Nov 17:14
33affb5

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: mysql in config.yml and point storage.mysql at 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.yml already 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.yml instead of refusing to start. A failed save logs a warning and retries on the next scheduled save.
  • Storage refactor — persistence is now a Storage interface with YamlStore (the crash-safe data.yml backend, behaviour unchanged) and MySqlStore backends, sharing one in-memory alert implementation (AbstractStore). Existing config.yml and data.yml files keep working; storage.type defaults to yaml.

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

Choose a tag to compare

@rconpilot rconpilot released this 19 Nov 17:38

Crash-safe persistence, chart ranges, per-item volatility, and a trading pause.

What's new

  • Crash-safe persistence — data.yml is now written atomically (temp file + atomic move), the previous file is kept as data.yml.bak, and saves are sequenced so an older async snapshot can never overwrite a newer one. If data.yml is ever unreadable at startup, LiveMarket restores from data.yml.bak with 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.yml can override the global pricing pressure with its own pressure-k and max-move. Make diamonds sluggish and wheat wild, per item.
  • Admin trading pause — /market pause and /market resume freeze all buying and selling while leaving browsing and price checks open. Set settings.trading-enabled: false to 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

Choose a tag to compare

@rconpilot rconpilot released this 16 Nov 15:37
3c39ccc

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, and count. 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

Choose a tag to compare

@rconpilot rconpilot released this 13 Nov 18:31

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.debug in 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

Choose a tag to compare

@rconpilot rconpilot released this 13 Nov 17:50

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.yml with 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.