> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sentrystudios.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Placeholders & Extras

> Detailed breakdown of PlaceholderAPI hooks, deep-shulker dupe protection, and canvas metadata security in SentryLore.

SentryLore isn't just an item formatter; it provides an enterprise security layer, deep container dupe scanning, and real-time placeholder hooks to integrate seamlessly with your server infrastructure.

***

## PlaceholderAPI Integration

SentryLore automatically registers its internal expansion with [PlaceholderAPI](https://github.com/PlaceholderAPI/PlaceholderAPI) on boot:

| Placeholder | Example Output | Description |
| :- | :- | :- |
| `%sentrylore_version%` | `1.0.0` | Returns the currently running version of SentryLore. |
| `%sentrylore_total_items%` | `87` | Total number of custom items saved in the H2/MySQL item registry. |
| `%sentrylore_player_toggled%` | `Enabled` / `Disabled` | Returns whether the viewing player has lore formatting active. |

***

## Hardware NBT Dupe Protection Engine

Custom items on competitive survival, skyblock, and factions servers are high-value economy drivers. Duplication glitches can destroy months of player progression overnight.

SentryLore incorporates an automated, hardware-accelerated **NBT Dupe Scanner**:

```mermaid theme={null}
sequenceDiagram
    autonumber
    actor Player as Player
    participant Inv as Inventory / Container Event
    participant Dupe as DupeManager (NBT Engine)
    participant Discord as Discord Webhook
    participant Log as Security Audit Log

    Player->>Inv: Clicks, Transfers, or Drops Item
    Inv->>Dupe: Reads PersistentDataContainer (sentrylore_uuid)
    alt Unique UUID
        Dupe-->>Inv: Validated & Allowed
    else Duplicate UUID Encountered
        Dupe->>Inv: Cancels Event & Deletes Duplicate Item
        Dupe->>Log: Records Flagged Item, Player UUID, Coordinates
        Dupe->>Discord: Dispatches Rich Embed Alert to Staff Channel
        Dupe-->>Player: Sends Error Toast in Chat
    end
```

**1. Cryptographic NBT Tagging**

Every custom item spawned through `/lore give <player> <id>` receives an immutable `sentrylore_uuid` string inside its `PersistentDataContainer`.

**2. Deep Shulker & Container Inspection**

When `deep-shulker-scan: true` is enabled, SentryLore inspects inside nested Shulker Boxes, Bundles, and Ender Chests during inventory interactions to catch exploiters attempting to stash duplicates inside storage containers.

**3. Instant Mitigation & Staff Alerts**

Upon encountering two identical UUIDs, the duplicated item is instantly neutralized, and an incident embed is dispatched to your staff Discord channel with timestamp, player name, and coordinates.

> [!TIP]
>
> Configure dupe protection behavior in `config.yml`:
>
> ```yaml theme={null}
> dupe-protection:
>   enabled: true
>   unstackable-only: true
>   deep-shulker-scan: true
>   discord-alerts: true
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.