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

# Placeholders

PlaceholderAPI placeholders for scoreboards, tab lists and holograms, and the placeholders of every message.

## PlaceholderAPI

With [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) installed, rnKoth registers the `%rnkoth_...%` placeholders automatically (no eCloud download needed). Use them in scoreboards, tab lists, holograms and other plugins.

Texts are given without colors. Names of KOTHs are their file names (`spawn` for `koths/spawn.yml`).

### Any KOTH

| Placeholder             | Example |                                                                                                                        |
| ----------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| `%rnkoth_running%`      | `1`     | How many KOTHs are running                                                                                             |
| `%rnkoth_near%`         | `yes`   | `yes` when the player is in the sidebar audience (`display.audience.sidebar`) of a running KOTH, else `no` (see below) |
| `%rnkoth_next_name%`    | `Spawn` | Display name of the KOTH that starts the soonest by its schedule                                                       |
| `%rnkoth_next_id%`      | `spawn` | Its name                                                                                                               |
| `%rnkoth_next_time%`    | `2h 5m` | Time until it starts                                                                                                   |
| `%rnkoth_next_seconds%` | `7500`  | The same, in seconds                                                                                                   |
| `%rnkoth_hud%`          | `on`    | `on` or `off`: whether the player has the locator and sidebar on (`/koth hud`)                                         |

When no KOTH is scheduled, the `next_` placeholders show `None` (`words.none` in the language file).

### One KOTH: `%rnkoth_<name>_<value>%`

For example `%rnkoth_spawn_holder%`. Use `current` instead of the name for the running KOTH closest to the player, in their world (or the first one running when none is in their world): `%rnkoth_current_holder%`. That is handy for one scoreboard line that works for every KOTH.

| Value         | Example           | While running                                                                                          | While not running                                  |
| ------------- | ----------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------- |
| `name`        | `Spawn`           | Display name                                                                                           | Display name                                       |
| `mode`        | `Capture`         | `Capture` or `Points`                                                                                  | The same                                           |
| `status`      | `running`         | `running`                                                                                              | `starting`, `disabled` or `waiting`                |
| `next`        | `2h 5m`           | Time until the next scheduled start                                                                    | The same, or `None`                                |
| `world`       | `Spawn`           | World of the current area, with its shown name (`display.world-name` or `world-names`, like `{world}`) | The same, for the area where the next event starts |
| `world_name`  | `world`           | Real name of that world                                                                                | The same                                           |
| `x`, `y`, `z` | `120`             | Middle of the current area                                                                             | Middle of the area where the next event starts     |
| `holder`      | `Steve`           | Player or team gaining now, or `None`                                                                  | `None`                                             |
| `leader`      | `Steve`           | The holder, or the best side when nobody holds it                                                      | `None`                                             |
| `percent`     | `45`              | Progress of the leader, 0 to 100                                                                       | `0`                                                |
| `progress`    | `45%` / `120/300` | Progress (capture) or points / target (score)                                                          | `0%`                                               |
| `points`      | `120`             | Points of the leader (score mode)                                                                      | `0`                                                |
| `time_left`   | `8:12`            | Time left (the overtime left during overtime, like `{time_left}`). `No limit` with `duration: 0`       | `0:00` (`No limit` with `duration: 0`)             |
| `elapsed`     | `6:48`            | Time since it opened                                                                                   | `0:00`                                             |
| `inside`      | `3`               | Players inside who count                                                                               | `0`                                                |
| `players`     | `7`               | Players who took part                                                                                  | `0`                                                |
| `distance`    | `16`              | Blocks from the player to the area (`-` in another world)                                              | `-`                                                |
| `your_time`   | `1:30`            | Time the player who sees it stood inside                                                               | `0:00`                                             |

With `current_` and no KOTH running, `status` shows `waiting` and the other values show `None`.

### Names you can't use

A KOTH name can't be one of the first words of these placeholders, or they would mix up: `running`, `current`, `next`, `top`, `hud`, `wins`, `captures`, `events`, `time`, `time_formatted`, `kills`, `king`, `king_kills`, `near`, nor start with `top_`, `next_` or `current_`. `/koth create` and the editor refuse them with a message. A file with such a name that you made by hand still loads, with a warning in the console.

### Show a scoreboard only near the KOTH (TAB and others)

`%rnkoth_near%` is `yes` while the player is in the **sidebar audience** of a running KOTH (`display.audience.sidebar` in its file, 60 blocks in a new KOTH; see [Who sees what](/rnsetups/rnkoth/guides/display.md#who-sees-what)), else `no`. It is exactly the players who get the rnKoth sidebar: with `sidebar: server` it is `yes` everywhere, with `world` in the KOTH's world, with `60` up to 60 blocks from the area, with `off` never. KOTH files without it (older files) use `display.sidebar-radius` of `config.yml` (0 = any distance in that world).

It does not depend on `display.sidebar` in `config.yml` or `/koth hud`, so it also works with the rnKoth sidebar turned off. Use it as a condition in your scoreboard plugin, so the KOTH scoreboard only shows near the event and your normal one comes back when the player walks away or changes world. For example in TAB (`plugins/TAB/config.yml` → `scoreboard` → `scoreboards`):

```yaml
    koth:
      # Your KOTH scoreboard (with display.sidebar: false in rnKoth's config.yml)
      display-condition: "%rnkoth_near%=yes"
    normal:
      # Your usual scoreboard, hidden while the rnKoth sidebar shows
      display-condition: "%rnkoth_near%=no"
```

### Stats of the player who sees it

| Placeholder               |                                                                                                          |
| ------------------------- | -------------------------------------------------------------------------------------------------------- |
| `%rnkoth_wins%`           | Wins                                                                                                     |
| `%rnkoth_captures%`       | Events where the player took control of a KOTH                                                           |
| `%rnkoth_events%`         | Events played                                                                                            |
| `%rnkoth_time%`           | Time holding, in seconds                                                                                 |
| `%rnkoth_time_formatted%` | Time holding, like `1:02:05`                                                                             |
| `%rnkoth_kills%`          | Kills during events where the killer or the victim was inside the area (kills of a teammate don't count) |
| `%rnkoth_king_kills%`     | Holder kills                                                                                             |

### Top lists

| Placeholder                            |                                                          |
| -------------------------------------- | -------------------------------------------------------- |
| `%rnkoth_top_<stat>_<position>_name%`  | Name at that position, e.g. `%rnkoth_top_wins_1_name%`   |
| `%rnkoth_top_<stat>_<position>_value%` | Value at that position, e.g. `%rnkoth_top_wins_1_value%` |

Stats: `wins`, `captures`, `events`, `time`, `kills`, `king_kills`. Positions 1 to 10. An empty position shows `-` for the name and `0` for the value. Top lists are read again every minute and after every event.

### Example scoreboard

```
&6&lKOTH
&7Name: &f%rnkoth_current_name%
&7Holder: &e%rnkoth_current_holder%
&7Progress: &a%rnkoth_current_progress%
&7Time left: &f%rnkoth_current_time_left%
&7
&7Next: &f%rnkoth_next_name% &7in &f%rnkoth_next_time%
&7Your wins: &f%rnkoth_wins%
```

## Placeholders inside messages

The texts of the language file and of the KOTH files use `{...}` placeholders. Each message in the language file lists the ones it can use. These are all of them:

**Every KOTH message**

| Placeholder         | Value                                                              |
| ------------------- | ------------------------------------------------------------------ |
| `{prefix}`          | The `prefix` of the language file                                  |
| `{koth}`            | Name of the KOTH (file name)                                       |
| `{koth_name}`       | Display name, with colors                                          |
| `{mode}`            | `Capture` or `Points`                                              |
| `{duration}`        | Length of the event, like `15:00` (`No limit` with `duration: 0`)  |
| `{overtime}`        | Overtime, like `1:00`                                              |
| `{target}`          | Points to win (score) or capture time (capture)                    |
| `{world}`           | World name, or the name from `world-names` / `display.world-name`  |
| `{world_id}`        | Real world name                                                    |
| `{x}`, `{y}`, `{z}` | Middle of the area (before an event: the area where it will start) |

**While the KOTH runs**

| Placeholder                         | Value                                                                                                                                                             |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{holder}`                          | Player or team gaining now, or `Nobody`                                                                                                                           |
| `{leader}`                          | The holder, or the best side                                                                                                                                      |
| `{percent}`                         | Progress of the leader, 0 to 100                                                                                                                                  |
| `{progress}`                        | `45%` (capture) or `120/300` (score)                                                                                                                              |
| `{points}`                          | Points of the leader                                                                                                                                              |
| `{bar}`                             | Progress bar like `■■■■□□□□□□`                                                                                                                                    |
| `{meter}`                           | Progress as `display.progress-style` says                                                                                                                         |
| `{time_left}`                       | Time left (the overtime left during overtime; `No limit` with `duration: 0`)                                                                                      |
| `{overtime_left}`                   | Overtime left                                                                                                                                                     |
| `{elapsed}`                         | Time since it opened                                                                                                                                              |
| `{capture_left}`                    | Seconds the leader still needs (capture mode)                                                                                                                     |
| `{inside}`                          | Players inside who count                                                                                                                                          |
| `{players}`                         | Players who took part                                                                                                                                             |
| `{move_in}`                         | Time until a roaming KOTH moves, or `-`                                                                                                                           |
| `{state}`                           | `Free`, `Capturing`, `Contested`, `Pushing back` (a side brings down another side's progress) or `Defending` (`contested: holder`, others inside with the holder) |
| `{top_1_name}` ... `{top_3_name}`   | The three best sides                                                                                                                                              |
| `{top_1_score}` ... `{top_3_score}` | Their progress or points                                                                                                                                          |

**About the player who reads it**

| Placeholder    | Value                           |
| -------------- | ------------------------------- |
| `{your_time}`  | Time you stood inside           |
| `{your_kills}` | Your kills in this event        |
| `{your_score}` | Progress or points of your side |

**In some messages only**

| Placeholder                                                       | Where                                                                                                                                                                                                              |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `{next}`                                                          | Time until the next start (hologram, menus, `/koth list`)                                                                                                                                                          |
| `{time}`, `{seconds}`                                             | Countdown and warnings: time until it opens                                                                                                                                                                        |
| `{needed}`, `{online}`                                            | `event.not-enough-players`                                                                                                                                                                                         |
| `{previous}`                                                      | `capture.taken` / `capture.taken-score`: the side that had it                                                                                                                                                      |
| `{winner}`, `{winner_score}`                                      | Results and `commands.on-end`                                                                                                                                                                                      |
| `{other}`, `{other_percent}`, `{other_progress}`, `{other_meter}` | While a side brings down another side's progress (`hud.draining`, `bossbar.draining`, `hologram.draining`, `hud.locator-draining`): that side and its progress                                                     |
| `{others}`                                                        | With `contested: holder`: how many players of other sides are inside while the holder keeps gaining (`bossbar.defending`, `bossbar.defending-score`, `hologram.defending`, `hud.locator-defending`), `0` otherwise |
| `{amount}`, `{items}`                                             | Reward box messages: the number and `item` / `items` (`words.item`, `words.items`)                                                                                                                                 |
| `{arrow}`, `{distance}`                                           | `hud.locator`                                                                                                                                                                                                      |

For the placeholders of reward lines (`{player}`, `{team}`, `{place}`...), see [Rewards](/rnsetups/rnkoth/guides/rewards.md#placeholders-in-rewards).

{% hint style="info" %}
Messages sent to a player also accept PlaceholderAPI placeholders of that player, and `{@path}` language words (see [Languages](/rnsetups/rnkoth/configuration/languages.md#language-words)). Commands (`[console]` and `[player]` reward lines, `commands.on-start` and `on-end`) accept them too: `{@path}` in the server language, PlaceholderAPI with the rewarded player (without a player in `commands.on-start` / `on-end`).
{% endhint %}
