> 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/features/player-delegate.md).

# Player Delegate

Player Delegate lets console initiate prompts for one target player, then dispatches the completed command as that player with a temporary permission group.

```
/playerdelegate <target> <permission-key> <command...>
/pd <target> <permission-key> <command...>
```

* `target` accepts a player name or a single-target selector such as `@p`. Multi-target selectors such as `@a` are rejected by the command's singular player argument.
* `permission-key` must match a group under `Permission-Attachment.Permissions`. Tab completion suggests only actually configured permission group keys.
* `%target_player%` is replaced with each target's name.
* The sender must be console and have `promptpaper.playerdelegate`.

When `Enable-Permission` is enabled and the delegated command contains prompt tags, the target player must also have `promptpaper.use`. The temporary attachment is applied only at final dispatch, so it cannot supply this initial gate. This target-side check does not block a direct delegated string with no prompt tags.

```
/playerdelegate CyR1en GAMEMODE gamemode <Which gamemode?> %target_player%
```

The configured permissions are attached immediately before dispatch and removed after `Permission-Attachment.ticks` (defaults to `0` in 3.2.0). If command dispatch fails or throws, the attachment is removed immediately. An unknown or empty permission group is rejected.

If the delegated string contains no prompt tags, it is dispatched immediately as the target player with the configured attachment. An unresolved preset or another rejected tag form is not dispatched literally.

Unqualified inline post-commands inherit the player execution context and the same permission-attachment behavior. An explicit `@player` forces player execution but does not inherit the attachment. A preset post-command follows its own `execute_as` setting and never inherits the delegate attachment, even when `execute_as` is `player`.

See [Permission Attachment](/commandprompter/features/permission-attachment.md) for configuration and security guidance.


---

# 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/features/player-delegate.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.
