# 🔍 Placeholders

PhoenixCrates supports **PlaceholderAPI**, allowing you to use player data from our plugin in other plugins that also support PlaceholderAPI. Below is a list of the available **PlaceholderAPI placeholders** as well as our **internal placeholders** that you can use in holograms.

## PlaceholderAPI

The following is the list of the available placeholders that Phoenixcrates has, make sure to replace the `<id>` with the ID of your crate without using the `<>.`

| Placeholders                                                | Description                                                                                      |
|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------|
| %phoenixcrates\_keys\_\<key_id>%                            | Returns the number of keys a user has (virtual + physical).                                      |
| %phoenixcrates\_cooldown\_\<crate_id>%                      | Returns the cooldown timer for that specific crate.                                              |
| %phoenixcrates\_totalopened\_\<crate_id>%                   | Returns the total number of how many times a user opened that specific crate.                    |
| %phoenixcrates\_totalopened%                                | Returns the total number of openings for a user.                                                 |
| %phoenixcrates\_rerolls\_available\_\<crate_id>%            | Returns the amount of rerolls a user has for a crate.                                            |
| %phoenixcrates\_guaranteed\_amount\_\<crate_id>%            | Returns the number of openings remaining until the user's next guaranteed reward for that crate.  |
| %phoenixcrates\_guaranteed\_reward\_\<crate_id>%            | Returns the name of the next guaranteed reward the user will receive for that crate.             |
| %phoenixcrates\_winLimit\_\<crate_id>\_\<reward_id>%        | Returns the player's win limit progress for a specified reward (amount/limit).                   |
| %phoenixcrates\_globalWinLimit\_\<crate_id>\_\<reward_id>%  | Returns the global win limit progress for a specified reward (amount/limit).                     |
| %phoenixcrates\_rewardTimeLimit\_\<crate_id>\_\<reward_id>% | Returns the time remaining until the reward expires.                                             |
| %phoenixcrates\_cooldownGlobalWin\_\<crate_id>\_\<reward_id>% | Returns the global win limit cooldown remaining.                                              |
| %phoenixcrates\_cooldownWinLimit\_\<crate_id>\_\<reward_id>% | Returns the player's win limit cooldown remaining.                                             |

## Hologram Placeholders

These are available in a crate's hologram lines, on top of any PlaceholderAPI placeholder.

| Placeholders      | Description                                                                                    |
| ----------------- | ---------------------------------------------------------------------------------------------- |
| %name%            | The crate's display name.                                                                      |
| %cooldown%        | The viewer's remaining cooldown for this crate, or the "available to open" text when there is none. |
| %virtual\_keys%   | How many virtual keys the viewer holds across every key linked to this crate.                  |
| %player%          | The viewer's name.                                                                             |
| %online%          | The number of players online.                                                                  |
| %max\_online%     | The server's player limit.                                                                     |
| %plugin\_version% | The installed PhoenixCrates version.                                                           |

Holograms are per player, so each viewer sees their own cooldown and key count. How often those values refresh is set with `hologram-refresh-rate` in [Main Configuration](../configurations/main-configuration.md).

## Internal Placeholders

The following placeholders are available when configuring reward display items, such as in the menus configuration:

| Placeholders     | Description                                                |
| ----------------- | ----------------------------------------------------------- |
| %player%     | Returns the name of the player. |
| %reward\_name%   | Returns the display name of the reward.                   |
| %reward\_lore%   | Returns the lore of the reward.                            |
| %percentage%     | Returns the configured weight/percentage of the reward.   |
| %chance%         | Returns the calculated chance (%) of receiving the reward. |
| %required\_keys% | Returns the number of keys required to redeem the reward. |
| %amount\_limit% | Returns the number of wins remaining before the reward's win limit is reached. |
| %global\_amount\_limit% | Returns the number of wins remaining before the reward's global win limit is reached. |

`%percentage%` and `%chance%` keep up to five decimals for values below 0.01, so a very rare reward does not show as 0.
| %win\_amount% | Returns the player's current win count for the reward (preview and select-reward menus). |
| %win\_limit% | Returns the reward's win limit (preview and select-reward menus). |
| %global\_win\_amount% | Returns the current global win count for the reward (preview and select-reward menus). |
| %global\_limit% | Returns the reward's global win limit (preview and select-reward menus). |
| %cooldown% | Returns the time remaining on the player's win limit cooldown (preview and select-reward menus). |
| %global\_cooldown% | Returns the time remaining on the global win limit cooldown (preview and select-reward menus). |
| %time% | Returns the time remaining until a time-limited reward expires (preview menu). |
| %rarity\_name% | Returns the reward's rarity display name (requires the Rarity Add-on). |
| %total\_selections% | Returns how many rewards are selected (mass selection menu). |
| %available\_keys% | Returns how many keys the player owns for the crate (mass selection menu). |
| %selected\_amount% | Returns how many times that reward is selected (mass selection menu). |

Source: https://www.phoenixplugins.com/docs/phoenix-crates/plugin-information/placeholders