# placeholderapi

PracticeBot registers a PlaceholderAPI expansion when PlaceholderAPI is installed.

## Identifier

```
practicebot
```

Placeholder format:

```
%practicebot_<placeholder>%
```

## General placeholders

| Placeholder                    | Output                                   |
| ------------------------------ | ---------------------------------------- |
| `%practicebot_version%`        | PracticeBot plugin version.              |
| `%practicebot_citizens_ready%` | `true` or `false`.                       |
| `%practicebot_template_count%` | Number of loaded templates.              |
| `%practicebot_total_bots%`     | Total PracticeBot runtime NPCs.          |
| `%practicebot_active_bots%`    | Spawned/active PracticeBot runtime NPCs. |
| `%practicebot_normal_bots%`    | Count of Normal bots.                    |
| `%practicebot_cpvp_bots%`      | Count of CPvP bots.                      |
| `%practicebot_crystal_bots%`   | Alias count for CPvP bots.               |
| `%practicebot_dummy_bots%`     | Count of Dummy bots.                     |

## Player-context placeholders

These require a player context. They are most useful in scoreboards, player menus, and player-specific holograms.

| Placeholder                         | Output                                           |
| ----------------------------------- | ------------------------------------------------ |
| `%practicebot_player_has_bot%`      | `true` if the player owns a runtime bot.         |
| `%practicebot_player_bot_name%`     | Player bot NPC name or `None`.                   |
| `%practicebot_player_bot_type%`     | `NORMAL`, `CPVP`, `DUMMY`, `UNKNOWN`, or `NONE`. |
| `%practicebot_player_bot_target%`   | Current bound target name or `None`.             |
| `%practicebot_player_bot_template%` | Current template key or `None`.                  |
| `%practicebot_player_bot_spawned%`  | `true` if the player's bot is spawned.           |
| `%practicebot_player_bot_health%`   | Bot health formatted to one decimal place.       |
| `%practicebot_player_bot_world%`    | Bot world name or `None`.                        |

## Example scoreboard lines

```
Bots: %practicebot_active_bots%
Templates: %practicebot_template_count%
Your Bot: %practicebot_player_bot_name%
Type: %practicebot_player_bot_type%
HP: %practicebot_player_bot_health%
```

## Troubleshooting placeholders

| Problem                           | Fix                                                                                                              |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Placeholder prints literally      | PlaceholderAPI is missing or the plugin did not register the expansion. Restart after installing PlaceholderAPI. |
| Player placeholder returns `None` | The player does not currently own a bot or the bot is not spawned.                                               |
| Counts show `0`                   | Citizens may not be ready, PracticeBot may be locked, or no bots are active.                                     |


---

# 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://edelweiss-network.gitbook.io/practicebot/placeholderapi.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.
