🏷️Placeholders

BlackMarket provides extensive placeholder support for dynamic content in lore, messages, and GUI elements.

PlaceholderAPI Integration

If PlaceholderAPI is installed, all BlackMarket placeholders are automatically available using the %blackmarket_<placeholder>% format.


Internal Placeholders

These placeholders work in items.yml lore and messages.yml without PlaceholderAPI.

Item Lore Placeholders

Available in items.yml for item lore and display names:

Placeholder
Description
Example Output

%price%

Formatted item price

$50,000

%player%

Player name

Steve

%item_chance%

Item spawn chance

25

%stock_remaining%

Items left in stock

7

%stock_max%

Maximum stock

10

%expire_time%

Time until expiry

5h 23m

%cooldown_time%

Cooldown remaining

2h 15m 30s

Example Usage:

diamond_sword:
  lore:
    - "&7Price: &e%price%"
    - "&7Stock: &e%stock_remaining%&7/&e%stock_max%"
    - "&7Rarity: &e%item_chance%%"

Message Placeholders

Available in messages.yml and lang/ files:

Placeholder
Description
Example Output

%prefix%

Message prefix

[BlackMarket] Β»

%price%

Item price

$50,000

%player%

Player name

Notch

%time%

Cooldown/time remaining

1h 30m

%time_until_reset%

Time until next reset

23:45:12

%time_until_reset_detailed%

Detailed reset time

23h 45m 12s

%reset_time%

Same as time_until_reset

23:45:12

%items_count%

Current market items

5

%market_type%

Market type

Global / Personal

%category%

Current category

Weapons

%debug_mode%

Debug status

true / false

%version%

Plugin version

2.0.4

%database_type%

Database type

MYSQL / SQLITE

%economy_provider%

Economy plugin

Vault (EssentialsX)

%server_type%

Server software

Paper / Folia

%current_language%

Active language

en_us

Example Usage:


GUI Placeholders

Available in config.yml GUI item lore:

Placeholder
Description
Example Output

%page%

Current page number

2

%total_pages%

Total pages

3

%category%

Selected category

Weapons

%categories%

All categories

All, Weapons, Armor

%time_until_reset%

Time to reset

23:45:12

%reset_interval%

Reset interval

24h

%items_count%

Items in market

5

%market_type%

Market type

Global

Example Usage:


PlaceholderAPI Placeholders

When PlaceholderAPI is installed, use these in any plugin that supports PAPI.

General Information

Placeholder
Description
Example

%blackmarket_time_until_reset%

Time until reset (HH:MM:SS)

23:45:12

%blackmarket_time_until_reset_detailed%

Detailed time

23h 45m 12s

%blackmarket_items_count%

Items in current market

5

%blackmarket_market_type%

Global or Personal

Global

%blackmarket_reset_interval%

Reset interval

24h

%blackmarket_items_per_reset%

Items shown per reset

5


Item-Specific Placeholders

Placeholder
Description
Example

%blackmarket_has_bought_<item>%

Whether player bought item

true / false

%blackmarket_cooldown_<item>%

Cooldown remaining

01:30:25

%blackmarket_stock_<item>%

Stock remaining

7 / Unlimited

Example: Check if player bought a specific item:


Lore Block Placeholders

Special placeholders that insert entire lore blocks from config.yml:

Placeholder
Replaced With
Configured In

%stock%

Stock information

lore.stock.lines

%out_of_stock%

Out of stock message

lore.out-of-stock.lines

%already_bought%

Already purchased

lore.already-bought.lines

%cooldown%

Cooldown info

lore.cooldown.lines

%expired%

Expired message

lore.expired.lines

%expires_in%

Expiry countdown

lore.expires-in.lines

How They Work:

When you use these in items.yml lore:

BlackMarket automatically inserts the appropriate lore from config.yml:

Conditional Display: These blocks only appear when relevant:

  • %stock% - Only if stock is limited

  • %out_of_stock% - Only if stock is depleted

  • %already_bought% - Only if one-time and purchased

  • %cooldown% - Only if on cooldown

  • %expired% - Only if item has expired

  • %expires_in% - Only if item has expiry time


Color Code Support

All placeholders support both legacy and MiniMessage color codes:

Legacy Color Codes

MiniMessage Format

Enable MiniMessage:


Time Format

Time placeholders automatically format durations:

Input Milliseconds
Short Format
Detailed Format

3661000 (1h 1m 1s)

01:01:01

1h 1m 1s

86400000 (1 day)

24:00:00

1d

7200000 (2 hours)

02:00:00

2h

60000 (1 minute)

01:00

1m

Available Formats:

  • %time_until_reset% β†’ 23:45:12

  • %time_until_reset_detailed% β†’ 23h 45m 12s

  • %expire_time% β†’ 5h 23m

  • %cooldown_time% β†’ 2h 15m 30s


External Plugin Integration

Scoreboard (via DeluxeScoreboard, FeatherBoard, etc.)

Tab List (via TAB, NametagEdit, etc.)

Chat (via ChatControl, EssentialsX Chat, etc.)

Holograms (via DecentHolograms, HolographicDisplays, etc.)

NPCs (via Citizens, ZNPCs, etc.)


Creating Dynamic Messages

Example 1: Purchase Notification

Example 2: Market Info

Example 3: Item Lore


Custom Placeholder Integration

You can use PlaceholderAPI expansions alongside BlackMarket placeholders:


Placeholder Conditions

Some placeholders are conditional:

Placeholder
Shown When

%stock%

Item has stock limit (stock: 10)

%out_of_stock%

Stock reaches 0

%already_bought%

Item is one-time and purchased

%cooldown%

Player is on cooldown

%expired%

Item expiry time passed

%expires_in%

Item has expiry configured


Debugging Placeholders

If placeholders aren't working:

  1. Check spelling: Placeholders are case-sensitive

  2. Verify PlaceholderAPI: /papi parse me %blackmarket_items_count%

  3. Enable debug: /bma debug

  4. Check logs: Look for "placeholder" errors

  5. Test in-game: Use /bma info to see current values


Next Steps

Last updated