Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Bring a dynamic stock market to your server! Players can invest, trade, and build a portfolio with live prices.
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 savedavgBuyPriceand then calledbuyShares(stock, 0, 0.0), which recomputed the average as0. After any restart or rejoin every position showed 100 % profit, and a fakeBOUGHT 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 removestocknow 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 reloadand all settings are read live. - Legacy
ยงcolour codes were placed insideComponent.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 withThreadLocalRandom.- Text columns padded with
%-16sdon'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> maxand/invest sell <stock> all.- Dividends: stocks can have a
dividend-yield; holders are paidprice ร yieldper 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 portfolioand the GUI. - Realised P/L, dividends and fees tracked per player and shown in
/invest portfolio. - Clickable chat: stock names in
/invest marketand/invest portfolioopen details;/invest infohas [Buy 1] [Buy 10] [Sell 1] [Sell All] [Chart] buttons. - Sparkline trend (
โโโโ โโ) in/invest infoand 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,createstockaccepts 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 marketand/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.
Platforms
Paper
26.1โ26.1.2
Dependencies
Paper