> 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/rncombatpvp/reference/placeholders.md).

# Placeholders

PlaceholderAPI placeholders of rnCombatPvP.

Needs [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi). Values are plain text (no colors), ready for scoreboards, tab lists and nametags. `yes` / `no` follow `words.yes` / `words.no` of the language file.

## Combat

| Placeholder                 | Value                                                                        |
| --------------------------- | ---------------------------------------------------------------------------- |
| `%rncombat_tagged%`         | `yes` while the player is in combat, else `no` (also `%rncombat_in_combat%`) |
| `%rncombat_time%`           | Seconds left in combat (`0` when not in combat)                              |
| `%rncombat_time_formatted%` | Seconds left with `s` (`12s`), or `-` when not in combat                     |
| `%rncombat_enemy%`          | Name of the last enemy, or `-`                                               |
| `%rncombat_enemy_health%`   | Health of the last enemy in hearts, or `-`                                   |
| `%rncombat_npc%`            | `yes` while the player's combat log NPC is in the world                      |

## Protections

| Placeholder                   | Value                                                                          |
| ----------------------------- | ------------------------------------------------------------------------------ |
| `%rncombat_pvp%`              | `on` or `off`                                                                  |
| `%rncombat_pvp_status%`       | The words `ON` / `OFF` of the language file                                    |
| `%rncombat_newbie%`           | Seconds of newbie protection left (`0` = none)                                 |
| `%rncombat_newbie_formatted%` | Newbie time left as `25m 10s`, or `-`                                          |
| `%rncombat_protected%`        | `yes` when the player can't be hit now (newbie, PvP off or respawn protection) |

## Stats

| Placeholder              | Value                                                 |
| ------------------------ | ----------------------------------------------------- |
| `%rncombat_kills%`       | Kills                                                 |
| `%rncombat_deaths%`      | Deaths                                                |
| `%rncombat_kdr%`         | Kills / deaths, with two decimals                     |
| `%rncombat_streak%`      | Current kill streak                                   |
| `%rncombat_best_streak%` | Best kill streak                                      |
| `%rncombat_assists%`     | Assists                                               |
| `%rncombat_rating%`      | Rating (ELO)                                          |
| `%rncombat_logs%`        | Times the player logged out in combat                 |
| `%rncombat_bounty%`      | Bounty on the player, formatted like money (`$1,500`) |
| `%rncombat_bounty_raw%`  | Bounty on the player as a plain number (`1500.0`)     |

## Top players

`%rncombat_top_<kind>_<place>_name%` and `%rncombat_top_<kind>_<place>_value%`, with `<kind>` one of `kills`, `kdr`, `streak`, `rating`, `assists` and `<place>` from 1 to 100.

* `%rncombat_top_kills_1_name%` → `Steve`
* `%rncombat_top_kills_1_value%` → `152`
* `%rncombat_top_streak_1_value%` is the best streak. The `kdr` list only has players with 5 kills or more.
* An empty place shows `-` as the name and `0` as the value.

Top lists are read from the database in the background and kept for 30 seconds, so scoreboards that ask every tick cost nothing.

## Example: TAB

Show a sword in front of players in combat with TAB instead of `display.nametag-prefix`, using a conditional placeholder of TAB:

```yaml
conditions:
  incombat:
    conditions:
      - "%rncombat_tagged%=yes"
    true: "&c⚔ "
    false: ""
```

Then use `%condition:incombat%` in the tag prefix of your groups. If your server uses the `es` language, compare with `sí`.

Placeholders of other plugins can also be used in every text of the language files.
