Glass plugin suite wiki by GlassMC and GlassHosting. Licensing and downloads are coming soon through GlassBilling.

GlassStocks

Version 1.0.0-alpha.5 • Tested on Paper 26.3 • Java 25 • Support: support@glasshosting.com

Overview

GlassStocks is a fictional stock exchange played with GlassShards. Six made-up companies are listed automatically; prices move on a timer with random swings and sector news. Players register for free, buy and sell whole shares through menus with a full quote screen, and track their portfolio and profit. Purchases and fees fund a shared exchange reserve that pays out sales; nothing is minted. There is no real-world market data and no real money.

Paid edition extras: staff IPO windows for approved player company proposals, player brokers (groups), and a scrolling market ticker in the menus.

Requirements

  • Paper 26.3 (tested), Java 25.
  • GlassShards (hard dependency). H2 is bundled; no database server needed.
  • Optional: PlaceholderAPI, Nexo.
  • The GlassShards resource pack for the custom menu icon.

Installation

  1. Stop the server, back up plugins/GlassShards/ and add GlassStocks to plugins/.
  2. Start. GLAS, REDS, ENDR, EMRD, NETH and HARV are listed.
  3. Optional: staff seed the reserve with /stocks fund 10000 (debits the staff member's checking, after confirmation).
  4. Players run /stocks join, then /stocks.

Commands

Aliases: /glassstocks, /invest.

Players (glassstocks.use)

Command What it does
/stocks or /stocks market Company browser, your checking balance and the reserve.
/stocks join Free investor registration with a confirmation screen.
/stocks portfolio Holdings, cost basis, value, unrealized and realized profit.
/stocks history Latest 28 orders, fees and settlement states.
/stocks buy <symbol> <shares> Review a BUY quote (nothing is spent until you confirm).
/stocks sell <symbol> <shares> Review a SELL quote.
/stocks company Submit a company proposal and see its status.
/stocks help Command guide.
/stocks broker Paid: broker menu.
/stocks broker create <name> Paid: form a broker.
/stocks broker invite <player> Paid: invite an online player (valid 10 minutes).
/stocks broker accept <name> Paid: join a broker.
/stocks broker leave Paid: leave your broker.
/stocks ticker Paid: toggle the action bar ticker while a market menu is open.

Staff (glassstocks.admin)

Command What it does
/stocks status Market open or paused, and the reserve.
/stocks pause / /stocks resume Stop or restart trading and price updates (persists).
/stocks recover Retry pending orders with their original receipts.
/stocks fund <shards> Contribute your checking funds to the reserve (in game, confirmed).
/stocks applications Review company proposals with a reason (no self-review).
/stocks ipo Paid: IPO window menu for approved applications.
/stocks ipo open <SYMBOL> [minutes] Paid: open a fixed-price IPO window (default 60 minutes).
/stocks ipo close <SYMBOL> Paid: close an IPO window early.
/glassstockspremium preset|discord|menu ... Paid edition. See Editions.

Permissions

Node Default Grants
glassstocks.use true Trading and player commands.
glassstocks.admin op Staff commands and IPO windows.
glassstocks.premium op (not declared in plugin.yml) Paid edition commands.

Configuration (config.yml)

Key Default Effect
market.interval-seconds 300 Seconds between price updates. Restart to apply.
market.fee-basis-points 100 Trade fee (100 = 1%), rounded up to whole shards. Range 0 to 1000. Restart to apply.
companies.<SYMBOL>.name for example Glassworks Industries Company name.
companies.<SYMBOL>.sector for example Manufacturing Sector (news events hit a sector).
companies.<SYMBOL>.initial-price 50 to 250 Starting price.
companies.<SYMBOL>.volatility-basis-points 100 to 400 Size of random moves.
companies.<SYMBOL>.supply 100000 Shares on offer.
metrics.enabled true bStats opt-out.
premium.discord.* off Paid alerts: stock_trade, ipo_open, ipo_close, broker_formed, broker_joined.
branding.item-model auto Menu icon model.

Companies in the config only seed new symbols once. Existing listings keep their saved price, inventory and settings; removing a symbol from YAML does not delete holdings. Up to 21 companies.

Market rules

  • Prices change every interval with company moves plus occasional sector news, capped at 5% per update, between 10 and 1,000,000 shards.
  • Whole shares only: 1 to 1000 per order, 10,000 per player per company.
  • Quotes last 30 seconds. A changed price needs a new review.
  • Buy total = shares x price + fee. Sale proceeds = shares x price - fee.
  • A sale bigger than the reserve is refused before anything moves.
  • No dividends, margin, shorting, leverage or limit orders.

PlaceholderAPI

glassstocks_joined, glassstocks_portfolio_value, glassstocks_portfolio_cost, glassstocks_portfolio_unrealized, glassstocks_portfolio_realized, glassstocks_portfolio_profit, glassstocks_shares, glassstocks_holdings, glassstocks_trades_24h, glassstocks_volume_24h, glassstocks_company_status, glassstocks_company_symbol, glassstocks_holding_<SYMBOL>_shares|value|cost|unrealized|realized, glassstocks_market_status, glassstocks_market_reserve, glassstocks_investor_count, glassstocks_listed_companies, glassstocks_market_volume_24h, glassstocks_stock_<SYMBOL>_price|previous|change|change_percent|name|sector|available|volume_24h|news. Add _formatted to numeric keys for comma grouping.

Using it efficiently

  • Use fees as a money sink. The large-network preset uses 2%; small-smp uses 0.5% with slower ticks.
  • Seed the reserve so early sellers are not refused.
  • Pause during maintenance with /stocks pause; pending settlements still complete.
  • Show a ticker board with holograms using %glassstocks_stock_GLAS_price% and %glassstocks_stock_GLAS_change_percent%.
  • NPC broker: /gnpc action broker RIGHT PLAYER_COMMAND stocks.
  • Backups: stop the server and back up plugins/GlassShards/ and plugins/GlassStocks/ together. Never restore only one.
  • One server only; do not share the H2 files across servers.

Integration with other Glass plugins

  • GlassShards: every trade settles against checking with a replay-safe receipt; while a settlement is pending, new trades and price updates wait.
  • GlassNPC: broker NPCs.

Troubleshooting

Problem Fix
Trading refused before registering Run /stocks join.
Sale refused for reserve Sell fewer shares or have staff /stocks fund.
Trading is frozen A settlement is pending; run /stocks recover.
Config change ignored Interval and fee need a full restart; existing companies keep saved settings.

Changelog

  • 1.0.0-alpha.5 (free edition alpha, from 2026-10-13): Nexo pack sync, Glass Shard menu icons, bug and test fixes. Paid edition adds IPO windows, brokers and the ticker.
  • 1.0.0-alpha.4: Fractional checking display with GlassShards alpha.6.
  • 1.0.0-alpha.3: Investor enrollment, company proposals, PlaceholderAPI.
  • 1.0.0-alpha.2: H2 startup fix.