# Placeholders

### 🔌 PlaceholderAPI (External)

These placeholders can be used in **other plugins** (like TAB, Scoreboard, Holograms, or chat formatting plugins) to display Crown data.

| Placeholder                 | Description                                                                                                           | Example Output   |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `%crown_is_banned%`         | Returns `true` or `false` if the player is banned.                                                                    | `true`           |
| `%crown_ban_time_left%`     | Time remaining on active ban.                                                                                         | `2d 4h` or `N/A` |
| `%crown_is_muted%`          | Returns `true` or `false` if the player is muted.                                                                     | `true`           |
| `%crown_mute_time_left%`    | Time remaining on active mute.                                                                                        | `30m`            |
| `%crown_is_softbanned%`     | Returns `true` or `false` if softbanned.                                                                              | `false`          |
| `%crown_softban_time_left%` | Time remaining on active softban.                                                                                     | `N/A`            |
| `%crown_is_warned%`         | Returns `true` or `false` if the player has an active warning.                                                        | `true`           |
| `%crown_warn_time_left%`    | Time remaining on the active warning.                                                                                 | `5d`             |
| `%crown_is_frozen%`         | Returns `true` or `false` if the player is currently frozen.                                                          | `false`          |
| `%crown_freeze_time_left%`  | Time remaining on the freeze (usually permanent).                                                                     | `Permanent`      |
| `%crown_<type>_count%`      | Total count of a specific punishment type. Replace `<type>` with: `ban`, `mute`, `kick`, `warn`, `softban`, `freeze`. | `3`              |
| `%crown_punish_count%`      | Total sum of all punishments on the player's record.                                                                  | `12`             |

***

### ⚙️ Internal Placeholders

These placeholders are **only** compatible within Crown's configuration files (`messages.yml`, `punish_info.yml`, menus, etc.).

#### Global & Player Info

Used in profiles, menus, and general messages.

| Placeholder       | Description                                 | Context         |
| ----------------- | ------------------------------------------- | --------------- |
| `{prefix}`        | The plugin prefix defined in `config.yml`.  | Global          |
| `{player}`        | The name of the executor (admin/mod).       | Global          |
| `{target}`        | The name of the target player.              | Global          |
| `{target_uuid}`   | The UUID of the target player.              | Global          |
| `{target_ip}`     | Target's IP address (masked if configured). | Menus / Profile |
| `{target_online}` | Display symbol (✔/❌) for online status.     | Menus           |
| `{target_world}`  | The world the target is currently in.       | Menus / Profile |
| `{target_coords}` | X, Y, Z coordinates of the target.          | Menus / Profile |
| `{xp_level}`      | Target's XP Level.                          | Profile         |
| `{play_time}`     | Target's total play time (formatted).       | Profile         |
| `{health}`        | Target's health (e.g., 18.5/20.0).          | Profile         |
| `{ping}`          | Target's latency in ms.                     | Check / Profile |
| `{gamemode}`      | Target's GameMode.                          | Check / Profile |

#### Punishment Context

Used in punishment messages, broadcast hooks, and history menus.

| Placeholder             | Description                                          |
| ----------------------- | ---------------------------------------------------- |
| `{reason}`              | The reason provided for the punishment.              |
| `{time}` / `{duration}` | The formatted duration string (e.g., "1 hour").      |
| `{time_left}`           | Time remaining until expiration.                     |
| `{punisher}`            | Name of the staff member who applied the punishment. |
| `{punishment_id}`       | The unique 6-character ID (e.g., `#AB12CD`).         |
| `{type}`                | Type of punishment (Ban, Mute, etc.).                |
| `{status}`              | Status of punishment (Active, Expired, Removed).     |
| `{method}`              | Method used: `IP` or `Local`.                        |
| `{date}`                | Date/Time the punishment was applied.                |

#### Report Context

Used in report menus and notifications.

| Placeholder   | Description                                      |
| ------------- | ------------------------------------------------ |
| `{report_id}` | Unique ID of the report.                         |
| `{requester}` | Name of the player who sent the report.          |
| `{category}`  | Category of the report (e.g., Hacking, Chat).    |
| `{details}`   | Extra details or chat input provided.            |
| `{moderator}` | Name of the staff member assigned to the report. |
| `{status}`    | Report status (Pending, Taken, Resolved).        |
