> For the complete documentation index, see [llms.txt](https://yowsef-development.gitbook.io/yowsef-development-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yowsef-development.gitbook.io/yowsef-development-docs/features/placeholders.md).

# placeholders

DialogMaster registers an outbound PlaceholderAPI expansion so other plugins (scoreboards, chat formatters, tab lists) can display leaderboard and player data.

## Registered Placeholders

| Placeholder                              | Description                                       | Example Output |
| ---------------------------------------- | ------------------------------------------------- | -------------- |
| `%dialogmaster_lb_<name>_<rank>_player%` | Player name at rank N on leaderboard              | `Yowsef`       |
| `%dialogmaster_lb_<name>_<rank>_value%`  | Formatted value at rank N on leaderboard          | `1,234`        |
| `%dialogmaster_rank_<name>_<player>%`    | Rank number of a specific player on a leaderboard | `4`            |
| `%dialogmaster_stat_kdr%`                | Requesting player's Kill/Death Ratio              | `2.45`         |
| `%dialogmaster_stat_playtime%`           | Requesting player's formatted playtime            | `14h 23m`      |
| `%dialogmaster_kit_<name>_cooldown%`     | Time remaining on a kit cooldown                  | `02:45:10`     |

Replace `<name>` with the leaderboard or kit ID from your config (e.g. `money`, `kills`, `starter`).

Values from leaderboard placeholders use the same formatting as the leaderboard dialog — whole numbers display without decimals, fractional values display with 2 decimal places, with thousands separators.

## Scoreboard / Tablist Example

```yaml
# Example using a sidebar scoreboard plugin
title: "<gold><bold>Top Richest"
lines:
  - "1. %dialogmaster_lb_money_1_player% — %dialogmaster_lb_money_1_value%"
  - "2. %dialogmaster_lb_money_2_player% — %dialogmaster_lb_money_2_value%"
  - "3. %dialogmaster_lb_money_3_player% — %dialogmaster_lb_money_3_value%"
  - ""
  - "Your Rank: #%dialogmaster_rank_money_%player_name%%"
```

## Using Placeholders Inside Menus

PlaceholderAPI placeholders are supported in all MiniMessage text fields inside menu YMLs (titles, body content, button labels, tooltips, requirements):

```yaml
body:
  - type: plain-message
    content: "<gray>Balance: <gold>$%vault_eco_balance_formatted%"
  - type: plain-message
    content: "<red>Kills: <white>%statistic_player_kills%"

buttons:
  - label: "<gold>💰 Balance: %vault_eco_balance_formatted%"
    view-requirements:
      - "%player_has_permission_vip% == true"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yowsef-development.gitbook.io/yowsef-development-docs/features/placeholders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
