# Plugin Integrations

Integrations with third party plugins to extend BattleArena functionality.

# Placeholder API

Within BattleArena, there is support to display arena 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 the number of players in a competition on a hologram through PlaceholderAPI.

### Placeholders

These are the placeholders for BattleArena. They are split into three sections: general placeholders, map placeholders and competition placeholders. General placeholders are not tied to a specific competition and show general information about arenas. Map placeholders pull information from a specific map. Competition placeholders will only resolve for players in a competition and will vary from player to player depending on which competition they are in.

#### General Placeholders

These placeholders show statistics for the arena specified. This information will look the same to each player seeing it in-game. **&lt;arena&gt;** is a placeholder for the arena to display information on (i.e. arena, battlegrounds, skirmish, etc.)

- **%ba\_&lt;arena&gt;\_active\_competitions%**: Displays the number of active competitions for this arena type.
- **%ba\_&lt;arena&gt;\_online\_players%**: The number of online players (alive &amp; spectator) across all competitions of this arena type.
- **%ba\_&lt;arena&gt;\_alive\_players%**: The number of alive players across all competitions of this arena type.
- **%ba\_&lt;arena&gt;\_spectators%**: The number of alive players across all competitions of this arena type.
- **%ba\_&lt;arena&gt;\_waiting\_competitions%**: The number of waiting competitions for this arena type.
- **%ba\_&lt;arena&gt;\_ingame\_competitions%**: The number of ingame competitions for this arena type.

#### Map Placeholders

These placeholders show statistics for the arena and map specified. This information will look the same to each player seeing it in-game. **&lt;arena&gt;** is a placeholder for the arena to display information on (i.e. arena, battlegrounds, skirmish, etc.), and **&lt;map&gt;** is the name of the map.

- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_arena%:** The name of the arena that the competition belongs to (i.e. Arena, Skirmish, etc.)
- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_alive\_players%:** The number of alive players in the competition.
- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_online\_players%:** The number of online players (alive &amp; spectator) in the competition.
- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_map%:** The name of the map this competition is taking place in.
- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_max\_players%:** The maximum players that can play in this competition.
- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_spectators%:** The number of spectators in the competition.
- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_phase%:** The phase this competition is currently in (i.e. waiting, countdown, etc.)
- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_time\_remaining%:** The time remaining for the competition (i.e. 4 minutes)
- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_time\_remaining\_short%:** The time remaining for the competition with a shorter format (i.e. 00:04)
- **%ba\_&lt;arena&gt;\_map\_&lt;map&gt;\_remaining\_start\_time%:** The amount of time until the competition starts (only resolves during the countdown phase)
- 

#### Competition Placeholders

These placeholders resolve for the current competition the player is in.

- **%ba\_competition\_arena%:** The name of the arena that the competition belongs to (i.e. Arena, Skirmish, etc.)
- **%ba\_competition\_alive\_players%:** The number of alive players in the competition.
- **%ba\_competition\_online\_players%:** The number of online players (alive &amp; spectator) in the competition.
- **%ba\_competition\_map%:** The name of the map this competition is taking place in.
- **%ba\_competition\_max\_players%:** The maximum players that can play in this competition.
- **%ba\_competition\_spectators%:** The number of spectators in the competition.
- **%ba\_competition\_phase%:** The phase this competition is currently in (i.e. waiting, countdown, etc.)
- **%ba\_competition\_team%:** The team the player belongs to in this competition.
- **%ba\_competition\_team%:** The team the player belongs to in this competition.
- **%ba\_competition\_team\_color%:** The hex color of the team the player belongs to in this competition.
- **%ba\_competition\_team\_color\_legacy%:** The legacy (section symbol) color of the team the player belongs to in this competition.
- **%ba\_competition\_team\_name\_formatted%:** The formatted name of the team the player belongs to in this competition.
- **%ba\_competition\_team\_name\_formatted\_legacy%:** The legacy (section symbol) formatted name of the team the player belongs to in this competition.
- **%ba\_competition\_time\_remaining%:** The time remaining for the competition (i.e. 4 minutes)
- **%ba\_competition\_time\_remaining\_short%:** The time remaining for the competition with a shorter format (i.e. 00:04)
- **%ba\_competition\_remaining\_start\_time%:** The amount of time until the competition starts (only resolves during the countdown phase)

# Custom Items

BattleArena has support for a number of plugins with custom items. This means that anywhere an [item can be defined](https://docs.bplug.in/books/user-guide/page/item-syntax), if one of these plugins is installed, you can use an item from there.

### Plugins Supported

- **QualityArmory**
- **Oraxen**
- **ItemsAdder**
- **MythicCrucible**
- **Magic**
- **MMOItems**
    - Contains support for defining MMOItem type, level and tier
    - Example: **mmoitems:epic\_sword{type=sword;level=5;tier=rare}**
- **WeaponMechanics**

### Defining Items  


In order to use items from these plugins, the same format of **&lt;namespace&gt;:&lt;key&gt;** for Minecraft items is used, with the **namespace** being the lowercase name of the plugin. For example:

- **oraxen:emerald\_bow** - Gets an emerald bow from Oraxen
- **qualityarmory:blaster** - Gets a blaster from QualityArmory
- **minecraft:iron\_sword** - Gets an iron sword from vanilla Minecraft