Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for Jellomind

Bring a dynamic stock market to your server! Players can invest, trade, and build a portfolio with live prices.

Report Invest?

R

2.0.0

InvestPlugin โ€” Changelog

2.0.0 (2026-09-03)

Drop-in upgrade for 1.0.0. Same plugin name, same data folder, same commands; existing config.yml, market.yml and portfolios/*.yml files are read and migrated automatically.

Bug fixes

  • Average buy price was wiped on every load. PortfolioManager.loadPortfolio() read the saved avgBuyPrice and then called buyShares(stock, 0, 0.0), which recomputed the average as 0. After any restart or rejoin every position showed 100 % profit, and a fake BOUGHT 0x <stock> line was pushed into the history each time. Holdings are now restored with their real cost basis and history is loaded without side effects.
  • Trades were not transaction-safe. Buying granted shares even when Vault refused the withdrawal; selling removed shares before depositing, so a failed deposit deleted both the shares and the money. Money now moves first and shares only change after the economy confirms. Failures are reported with the economy's error message.
  • Delisting a stock silently deleted everyone's holdings. /investadmin removestock now refunds every holder (online or offline) at the current price and logs it in their history.
  • Prices ran away. Trend values of 1โ€“2 % per 5-minute tick compound to absurd numbers within weeks (EnderLogistics: $310 โ†’ ~$1 trillion in 30 days with the 1.0.0 defaults). Added mean reversion towards a per-stock base price, a per-tick move cap and configurable price floor/ceiling. Default trends were reduced to sane values.
  • Fee and share cap were read once at startup; config could not be reloaded. Added /investadmin reload and all settings are read live.
  • Legacy ยง colour codes were placed inside Component.text(). Everything now goes through the Adventure legacy serializer, so item names, lore and inventory titles render correctly (and are no longer forced italic).
  • Removed emoji (๐Ÿ“ˆ ๐Ÿ“Š ๐Ÿ“œ) from headers/titles โ€” they render as boxes in the vanilla client.
  • new Random() per call replaced with ThreadLocalRandom.
  • Text columns padded with %-16s don't line up in Minecraft's proportional font; market and portfolio lines were redesigned without padding.

New features

  • Market GUI (/invest gui): every stock as an item with live price, change, sparkline, risk, dividend and your position. Left-click opens the chart, right-click quick-buys 1, shift+right quick-sells 1. Sort by name / change / owned, automatic paging past 45 stocks, portfolio / leaderboard / market-status cards.
  • Chart GUI rebuilt: the 9 columns now span the whole stored history window (default 8 h) instead of the last 9 ticks; hover shows time and % move. Buy 1 / 10 / max and Sell 1 / 10 / all buttons refresh the GUI in place instead of closing it.
  • /invest buy <stock> max and /invest sell <stock> all.
  • Dividends: stocks can have a dividend-yield; holders are paid price ร— yield per share every N ticks (hourly by default), including offline players (async scan, main-thread deposits). Inactive accounts (>30 days) are skipped. Players are told what they earned while away when they log in.
  • Leaderboard (/invest top): richest investors across all players, computed off the main thread; your rank is shown in /invest portfolio and the GUI.
  • Realised P/L, dividends and fees tracked per player and shown in /invest portfolio.
  • Clickable chat: stock names in /invest market and /invest portfolio open details; /invest info has [Buy 1] [Buy 10] [Sell 1] [Sell All] [Chart] buttons.
  • Sparkline trend (โ–โ–‚โ–ƒโ–…โ–‡โ–ˆ) in /invest info and item lore; 8 h high/low.
  • Single-stock news events: BREAKTHROUGH, BUYOUT_RUMOR, PRODUCT_RECALL, SCANDAL hit one company (random or admin-chosen). VOLATILITY_SPIKE now doubles volatility for 6 ticks.
  • Price impact (optional, trading.price-impact): buying nudges the price up, selling down.
  • Admin: set <stock> <price|base|volatility|trend|dividend|icon|description> <value>, give <player> <stock> <amount>, triggerevent <type> [stock], paydividends, reload, stats, createstock accepts optional trend and dividend, stock name validation.
  • PlaceholderAPI (optional soft-depend): %invest_value%, %invest_unrealized%, %invest_realized%, %invest_dividends%, %invest_rank%, %invest_positions%, %invest_shares_<stock>%, %invest_price_<stock>%, %invest_change_<stock>%, %invest_top_name_<n>%, %invest_top_value_<n>%.
  • Optional sound feedback on trades and optional Vault currency formatting.
  • Structured transaction history (type/stock/amount/price/profit/time) that can be re-rendered; old string entries are kept as-is.
  • Portfolio files store last-known name and last-seen time; per-file locking; dirty-only saves.
  • Console can run /invest market and /invest top.

Config

New nested layout (market.*, trading.*, dividends.*, leaderboard.*, sounds, use-vault-format). The 1.0.0 flat keys are still honoured as fallbacks, so an untouched old config keeps working; delete it once to get the documented new file.

Information

Published
September 3, 2026
Author
4Downloads

Platforms

Paper
Paper
26.1โ€“26.1.2

Dependencies

PaperPaper

Dependencies: Paper

Plugins and libraries a server needs for this version to run.

No dependencies

Add anything a server has to install alongside this version.