# PlaceholderAPI Support

## 📚 PlaceholderAPI Support

🏷️ **Placeholders**\
This page lists all available placeholders provided by the plugin TheRewards, including optional support for leaderboard plugins.

***

### 🎁 **Reward Placeholders**

These placeholders require you to replace `{reward}` with the name of your reward (as defined in your configuration).

| Placeholder                                         | Descripción                                                 |
| --------------------------------------------------- | ----------------------------------------------------------- |
| `%therewards_player_cooldown_reward_{reward}%`      | Time remaining until the reward can be claimed again.       |
| `%therewards_player_times_claimed_reward_{reward}%` | Number of times the player has claimed that reward.         |
| `%therewards_player_is_onetime_reward_{reward}%`    | Whether the reward is single-use (`true` or `false`).       |
| `%therewards_player_available_reward_{reward}%`     | If the reward is available for claiming (`true` o `false`). |

📝 **Ejemplo**: `%therewards_player_cooldown_reward_daily%`

***

### 🎯 **General Reward Counters**

| Placeholder                             | Descripción                                                |
| --------------------------------------- | ---------------------------------------------------------- |
| `%therewards_player_available_rewards%` | Total number of rewards currently available to the player. |

***

### 🔥 **Streak Placeholders**

These do not require specifying a reward.

| Placeholder                            | Descripción                                                          |
| -------------------------------------- | -------------------------------------------------------------------- |
| `%therewards_player_max_streak%`       | Highest reward streak achieved by the player.                        |
| `%therewards_player_current_streak%`   | Player's current streak.                                             |
| `%therewards_player_cooldown_streak%`  | Time remaining to claim the next streak reward.                      |
| `%therewards_player_available_streak%` | Whether the streak reward is available to claim (`true` or `false`). |

***

### ⏳ **PlayTime Placeholders**

<table><thead><tr><th width="415.3333740234375">Placeholder</th><th>Description</th></tr></thead><tbody><tr><td><code>%therewards_player_playtime_claimable_available%</code></td><td>If game time rewards are available for claiming (<code>true</code> or <code>false</code>).</td></tr><tr><td><code>%therewards_player_playtime_remaining%</code></td><td>Formatted time remaining (e.g. "2d 3h 45m 30s").</td></tr><tr><td><code>%therewards_player_playtime_claimed_count%</code></td><td>Number of game time rewards already claimed.</td></tr><tr><td><code>%therewards_player_playtime_claimable_count%</code></td><td>Number of game time rewards available to claim.</td></tr><tr><td><code>%therewards_player_playtime_remaining_seconds%</code></td><td>Time remaining to the next reward in seconds.</td></tr><tr><td><code>%therewards_player_playtime_remaining_minutes%</code></td><td>Time remaining to the next reward in minutes.</td></tr><tr><td><code>%therewards_player_playtime_remaining_hours%</code></td><td>Time remaining to the next reward in hours.</td></tr><tr><td><code>%therewards_player_playtime_remaining_days%</code></td><td>Time remaining to the next reward in days.</td></tr></tbody></table>

***

### 🏆 **Top Leaderboards (**&#x4F;ptional Integratio&#x6E;**)**

Although TheRewards does not include built-in leaderboards, you can display them using plugins like Topper or ajLeaderboards.

***

#### 📊Using Topper

Configure Topper’s file:

```yaml
placeholders:
  maxstreak: '%therewards_player_max_streak%'
```

Example for a hologram (DecentHolograms):

```yaml
pages:
  - lines:
      - content: "&6&lTOPS"
        height: 0.5
      - content: "&f# 1 - &d%topper_maxstreak;top_name;1% &8| &a%topper_maxstreak;top_value;1%"
        height: 0.3
      - content: "&f# 2 - &d%topper_maxstreak;top_name;2% &8| &a%topper_maxstreak;top_value;2%"
        height: 0.3
      - content: "&f# 3 - &d%topper_maxstreak;top_name;3% &8| &a%topper_maxstreak;top_value;3%"
        height: 0.3
    actions: {}
```

***

#### 📊 Using **ajLeaderboards**

Command to add a leaderboard:

```bash
/ajleaderboards add therewards_player_max_streak
```

Example for a hologram (DecentHolograms):

```yaml
pages:
  - lines:
      - content: '&6&lTOPS'
        height: 0.5
      - content: '&f#1 &e- &f%ajlb_lb_therewards_player_max_streak_1_alltime_name% &f⇨ &e%ajlb_lb_therewards_player_max_streak_1_alltime_value%'
        height: 0.3
      - content: '&f#2 &e- &f%ajlb_lb_therewards_player_max_streak_2_alltime_name% &f⇨ &e%ajlb_lb_therewards_player_max_streak_2_alltime_value%'
        height: 0.3
      - content: '&f#3 &e- &f%ajlb_lb_therewards_player_max_streak_3_alltime_name% &f⇨ &e%ajlb_lb_therewards_player_max_streak_3_alltime_value%'
        height: 0.3
    actions: {}
```

***

💡 If you are using a different hologram or leaderboard plugin, simply adapt the corresponding placeholders.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xshyo.us/free-plugins/therewards/placeholderapi-support.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
