PlaceholderAPI

Expose market data to holograms, scoreboards, and any PAPI-aware plugin.

When PlaceholderAPI is installed, TheBrewingMarket automatically registers an expansion and exposes the data below. PlaceholderAPI is a soft dependency: servers without it run unchanged, they just don't get the placeholders.

Two identifiers, same data: every placeholder is registered under both tbm_ and thebrewingmarket_. Use whichever reads better. For example %tbm_daily_earned% and %thebrewingmarket_daily_earned% are identical.

Value format

Numeric placeholders come in two flavours:

  • Formatted — e.g. %tbm_daily_earned%1,234 coins, using the Vault economy formatter.
  • Raw — same name suffixed with _raw, e.g. %tbm_daily_earned_raw%1234.0. Use these when feeding math into conditions, scoreboards, or other plugins.

Daily limit

Reads live from the in-memory daily tracker — updates instantly on every sale.

PlaceholderTypeDescription
%tbm_daily_earned%StringMoney earned today, formatted.
%tbm_daily_earned_raw%DoubleMoney earned today, raw.
%tbm_daily_limit%StringDaily cap from market.limitation.earnings.
%tbm_daily_limit_raw%DoubleDaily cap, raw.
%tbm_daily_remaining%Stringmax(0, limit − earned), formatted.
%tbm_daily_remaining_raw%DoubleSame, raw.
%tbm_daily_percent%IntegerProgress towards the cap, clamped 0100.
%tbm_limit_active%Booleantrue if market.limitation.enable is on.

Base prices

Read the configured base price for any recipe — flat entries and group-defined prices are both supported. The recipe id goes in the placeholder name.

PlaceholderTypeExample
%tbm_price_<recipe>%String%tbm_price_wine%150 coins
%tbm_price_<recipe>_raw%Double%tbm_price_wine_raw%150.0

Lifetime stats (per player)

Cached per player on join and kept in sync with every sale. Invalidated on quit to keep memory small.

PlaceholderTypeDescription
%tbm_lifetime_earned%StringAll-time earnings from the market, formatted.
%tbm_lifetime_earned_raw%DoubleSame, raw.
%tbm_lifetime_brews%LongTotal brews the player has ever sold.
%tbm_last_sale_amount%StringMoney from the most recent sale, formatted.
%tbm_last_sale_amount_raw%DoubleSame, raw.
%tbm_last_sale_recipe%StringRecipe id of the last brew sold.
%tbm_last_sale_ago%StringRelative time (e.g. 5 min ago).

Per-recipe stats (per player)

Check whether a player has ever sold a specific brew, and how much.

PlaceholderTypeDescription
%tbm_player_sold_<recipe>%Booleantrue if the player has sold at least one of that recipe.
%tbm_player_sold_<recipe>_qty%LongTotal units of that recipe sold.
%tbm_player_sold_<recipe>_total%StringTotal money earned from that recipe, formatted.
%tbm_player_sold_<recipe>_total_raw%DoubleSame, raw.
Example: %tbm_player_sold_wine%true if the player has ever sold a wine, %tbm_player_sold_wine_qty% → the exact unit count.

Global analytics

Server-wide daily snapshot refreshed from the database every 60 seconds. These placeholders are independent of the player viewing them — ideal for public scoreboards and holograms.

PlaceholderTypeDescription
%tbm_global_total_today%StringTotal money earned by everyone today, formatted.
%tbm_global_total_today_raw%DoubleSame, raw.
%tbm_global_top_recipe_today%StringMost-sold recipe today (ties broken alphabetically).
%tbm_global_top_recipe_today_qty%LongUnits sold of that top recipe today.
%tbm_global_top_player_today%StringPlayer name with the highest earnings today.
%tbm_global_top_player_today_amount%StringThat player's earnings today, formatted.
%tbm_global_top_player_today_amount_raw%DoubleSame, raw.
Refresh interval: global analytics can be up to 60 seconds stale. The refresh runs on the async DB executor, so it never blocks the server tick.

Verification

Test with PlaceholderAPI's built-in /papi parse command:

in-game
/papi info tbm
/papi info thebrewingmarket
/papi parse <yourName> %tbm_daily_earned% / %tbm_daily_limit%
/papi parse <yourName> %tbm_lifetime_brews% brews, %tbm_lifetime_earned% earned
/papi parse <yourName> top recipe: %tbm_global_top_recipe_today% (%tbm_global_top_recipe_today_qty%)