# Placeholders

## Placeholders in config.yml

Supports PlaceholderAPI placeholders

## Placeholders in messages.yml

Supports PlaceholderAPI placeholders based on the viewer

## Command-linked placeholders

| Placeholder          | Description                     |
| -------------------- | ------------------------------- |
| %command%            | The command used                |
| %commandDescription% | Description of the (sub)command |
| %commandPermission%  | Permission of the (sub)command  |
| %subcommand%         | The subcommand used             |
| %subcommand+args%    | Syntax of (sub)command          |

## Contextual Placeholders

The placeholders below are created gradually which means not every single one is available at all times.

### Menu Placeholders

{% hint style="info" %}
Valid for:

* /leaderboardmenu
* /leaderboardmenuadmin open
* /leaderboardmenuadmin openpage
  {% endhint %}

<table><thead><tr><th width="380">Placeholder</th><th>Description</th></tr></thead><tbody><tr><td>%currentPage%</td><td>The current page in the menu</td></tr><tr><td>%maxPages%</td><td>The max pages in the menu</td></tr><tr><td>%target%</td><td>The menu viewer name</td></tr><tr><td>%refreshFrequency%</td><td>The specified refresh frequency</td></tr><tr><td>%boardName%</td><td>The board name</td></tr><tr><td>%boardDisplayName%</td><td>The board display name</td></tr><tr><td>%aliasCommand%</td><td>The alias command for the board</td></tr><tr><td>%type%</td><td>The board type</td></tr><tr><td>%scorePrefix%</td><td>The score prefix of the board</td></tr><tr><td>%scoreSuffix%</td><td>The score suffix of the board</td></tr><tr><td>%includeZero%</td><td>Whether to include score of 0 (true/false)</td></tr><tr><td>%hasCustomItems%</td><td>Whether the board has custom items (true/false)</td></tr><tr><td>%hasOverriddenLeaderboardPlayerItem%</td><td>Whether the board has overridden the leaderboard player item (true/false)</td></tr><tr><td>%totalEntries%</td><td>Total leaderboard players in the menu</td></tr><tr><td>%totalScore%<br>%totalScorePretty%<br>%totalScoreFormatted%<br>%totalScoreFormattedUppercase%</td><td>Total score of the board</td></tr><tr><td><p>%topPlayerName%<br>%topPlayerScore%<br>%topPlayerPosition%<br>%topPlayerUuid%<br>%topPlayerScorePretty%<br>%topPlayerScoreFormatted%<br>%topPlayerScoreFormattedUppercase%</p><p>%topPlayerScoreFormattedTicks%</p><p>%topPlayerScoreFormattedMillis%<br>%topPlayerScoreFormattedSeconds%<br>%topPlayerScoreFormattedMinutes%<br>%topPlayerScoreFormattedHours%<br>%topPlayerScoreFormattedDays%</p></td><td>Placeholders for the top player. If doesn't exist, "N/A"</td></tr><tr><td><p>%bottomPlayerName%<br>%bottomPlayerScore%<br>%bottomPlayerPosition%<br>%bottomPlayerUuid%<br>%bottomPlayerScorePretty%<br>%bottomPlayerScoreFormatted%<br>%bottomPlayerScoreFormattedUppercase%</p><p>%bottomPlayerScoreFormattedTicks%</p><p>%bottomPlayerScoreFormattedMillis%<br>%bottomPlayerScoreFormattedSeconds%<br>%bottomPlayerScoreFormattedMinutes%<br>%bottomPlayerScoreFormattedHours%<br>%bottomPlayerScoreFormattedDays%</p></td><td>Placeholders for the bottom player. If doesn't exist, "N/A"</td></tr><tr><td><p>%viewerName%<br>%viewerScore%<br>%viewerPosition%<br>%viewerUuid%<br>%viewerScorePretty%<br>%viewerScoreFormatted%<br>%viewerScoreFormattedUppercase%<br>%viewerScoreFormattedTicks%</p><p>%viewerScoreFormattedMillis%<br>%viewerScoreFormattedSeconds%<br>%viewerScoreFormattedMinutes%<br>%viewerScoreFormattedHours%<br>%viewerScoreFormattedDays%</p></td><td>Placeholders for the viewer player. If doesn't exist, "N/A"</td></tr></tbody></table>

{% hint style="success" %}
These placeholders are pretty much usable anywhere.
{% endhint %}

### Leaderboard Player Specific Placeholders

| Placeholder               | Description                                               |
| ------------------------- | --------------------------------------------------------- |
| %position%                | Position of the player in the leaderboard                 |
| %playerName%              | Name of the player                                        |
| %uuid%                    | UUID of the player                                        |
| %score%                   | Score format: 19288.0                                     |
| %scorePretty%             | Score format: 19288                                       |
| %scoreFormatted%          | Score format: 19,29k                                      |
| %scoreFormattedUppercase% | Score format: 19,29K                                      |
| %scoreFormattedTicks%     | Score (in ticks) converted into y, mo, d, h, s, ms        |
| %scoreFormattedMillis%    | Score (in milliseconds) converted into y, mo, d, h, s, ms |
| %scoreFormattedSeconds%   | Score (in seconds) converted into y, mo, d, h, s, ms      |
| %scoreFormattedMinutes%   | Score (in minutes) converted into y, mo, d, h, s, ms      |
| %scoreFormattedHours%     | Score (in hours) converted into y, mo, d, h, s, ms        |
| %scoreFormattedDays%      | Score (in days) converted into y, mo, d, h, s, ms         |

The placeholders from [#menu-placeholders](#menu-placeholders "mention") are usable here as well.

### Update Checker Placeholders

The placeholders you can use in **messages.yml**

| Placeholder     | Description                    |
| --------------- | ------------------------------ |
| %oldVersion%    | The old plugin version         |
| %newVersion%    | The new plugin version         |
| %checkDuration% | Time taken to check for update |
