# Plugin Integrations

Integrations with third party plugins to extend BattleTracker functionality.

# Placeholder API

  
Within BattleTracker, there is support to display tracker info through a plugin called [PlaceholderAPI](https://www.spigotmc.org/resources/placeholderapi.6245/). If you are unfamiliar with the plugin, it allows for you to show information with certain placeholders (e.g. %player\_name% will return the player name) in plugins that have support for PlaceholderAPI. An example usage of this is displaying your PVP kills through BattleTracker on a scoreboard through PlaceholderAPI.

If you also have BattleArena installed, you can display tracker information from it too. An example usage of this is displaying the top players in arena. The support for these placeholders even extends to custom arena games you have created or even plugins that hook into BattleTracker directly for stats.

### Placeholders

These are the placeholders for BattleTracker. They are split into two sections: player placeholders and rating placeholders. Player placeholders get information on the player that "sees" the placeholder. The rating placeholders get information about players for the rating you specify.

#### Player Placeholders

These placeholders show statistics for the player viewing the information. This information will look different to each player seeing it in-game. **&lt;tracker&gt;** below can be replaced with any tracker BattleTracker has registered (i.e. pvp, pve).

- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_kills%**: Displays the number of kills.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_losses%**: Displays the number of losses.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_ties%**: Displays the number of ties.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_streak%**: Displays the current streak.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_max\_streak%**: Displays the max streak.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_ranking%**: Displays the current ranking.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_max\_ranking%**: Displays the max ranking reached.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_rating%**: Displays the current rating.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_max\_rating%**: Displays the max rating reached.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_kd\_ratio%**: Displays the kills-to-deaths ratio.</span>
- <span class="hljs-section">**%bt\_&lt;tracker&gt;\_max\_kd\_ratio%**: Displays the max kills-to-death ratio.  
    </span>

<span class="hljs-section">If you are using BattleArena, replace the tracker name with the name of your arena.</span>

#### Rating Placeholders

These placeholders show statistics for the top players. The placeholder must be specified with a rating at the end. **&lt;tracker&gt;** below can be replaced with any tracker BattleTracker has registered (i.e. pvp, pve). **&lt;rating&gt;** below can be replaced with the rating you want to get placeholder information from. For example, `1` will get information from the #1 player on the leaderboard.

- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_kills\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the number of kills.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_losses\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the number of losses.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_ties\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the number of ties.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_streak\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the current streak.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_max\_streak\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the max streak.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_ranking\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the current ranking.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_max\_ranking\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the max ranking reached.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_rating\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the current rating.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_max\_rating\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the max rating reached.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_kd\_ratio\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the kills-to-deaths ratio.
- **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_max\_kd\_ratio\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;</span>%**: Displays the max kills-to-deaths ratio.

Additionally, if you wish to get the name or UUID of the user that holds a certain rating, you can add **\_name** or **\_uuid** to the end of the placeholder (i.e. **%bt\_<span class="hljs-tag">&lt;<span class="hljs-name">tracker</span>&gt;</span>\_top\_kills\_<span class="hljs-tag">&lt;<span class="hljs-name">rating</span>&gt;\_name</span>%**).

<span class="hljs-section">If you are using BattleArena, replace the tracker name with the name of your arena.</span>