> For the complete documentation index, see [llms.txt](https://cyr1en.gitbook.io/commandprompter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cyr1en.gitbook.io/commandprompter/prompts/player-ui-prompt.md).

# Player UI Prompt

Use `p:` to show a paginated inventory of visible online players. Clicking a head returns that player's name.

```
/mute <p:Who should be muted?>
```

Use `<p:filter:Display text>` for one player filter:

```
/teleport <p:w:Choose someone in your world>
```

## Filters

| Filter              | Key                | Requires   | Result                                             |
| ------------------- | ------------------ | ---------- | -------------------------------------------------- |
| World               | `w`                | Nothing    | Players in the prompting player's world            |
| Radius              | `r<number>`        | Nothing    | Players within that many blocks in the same world  |
| Exclude self        | `s`                | Nothing    | All online players except the prompting player     |
| Towny town          | `tt`               | Towny      | Online members of the prompting player's town      |
| Towny nation        | `tn`               | Towny      | Online members of the prompting player's nation    |
| HuskTowns town      | `ht`               | HuskTowns  | Online members of the prompting player's town      |
| Own primary group   | `lpo`              | LuckPerms  | Players with the same primary group                |
| Named primary group | `lpg<group>;`      | LuckPerms  | Players whose primary group is `group`             |
| Shared region       | `wgr`              | WorldGuard | Players sharing a region with the prompting player |
| Region members      | `wgrm<region-id>;` | WorldGuard | Online members of that region                      |
| Region owners       | `wgro<region-id>;` | WorldGuard | Online owners of that region                       |

Only filters whose optional integration is installed are registered. Multiple filter tokens can be combined and will compose (intersect) — for example, `r10s` selects players within 10 blocks AND excludes the prompting player. The filter parser uses an anchored longest-match tokenizer, ensuring that specific keys (such as `wgr` or `wgrm...;`) are matched correctly without being shadowed by shorter keys like `w`. If a filter token is not recognized, it is skipped.

## Search and Empty State

* **Search**: Clicking the Search button opens an Anvil GUI configured via `PlayerUI.Search.AnvilItem.*` for entering a name filter. If no NMS anvil provider is available, it gracefully falls back to chat input. Matching heads are then displayed in the updated grid.
* **Empty State**: When no online players match the filter or search query, a non-clickable `BARRIER` item is displayed in the center of the inventory with `PlayerUI.Empty-Message`.
* **Head Cache & Vanish**: `PlayerUI.Cache-Size` configures a bounded LRU cache for player head item stacks (`<= 0` for unbounded). The player list is always derived fresh from online players, meaning cache eviction never hides online players. Vanish integrations (SuperVanish, PremiumVanish, VanishNoPacket) are enforced at the cache boundary: vanished players are never cached and never appear in filtered or unfiltered views.

Closing the inventory or clicking Cancel cancels the prompt session.

See [Player UI settings](/commandprompter/configuration/prompts-configuration/player-ui.md).

![](https://i.imgur.com/1aPNEWf.png)

{% embed url="<https://cdn.discordapp.com/attachments/936346802951716880/1184752613003108392/2023-12-13_23-51-00.mp4?ex=658d1dda&hm=b4bcf5e70a5ec0109536bbcf05f97f9512752b3bf79d2fcc14dd6ba131347731&is=657aa8da>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cyr1en.gitbook.io/commandprompter/prompts/player-ui-prompt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
