> 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/getting-started/usage.md).

# Usage

CommandPrompter intercepts commands containing placeholders (**Prompts**), pauses execution to ask the player to fill in the blanks, and then runs the completed command. By default, prompts are enclosed in angle brackets `< >` (configurable).

{% hint style="info" %}
Use [Console Delegate](/commandprompter/features/console-delegate.md) or [Player Delegate](/commandprompter/features/player-delegate.md) to force another player to fill out a prompt.
{% endhint %}

***

## How it Works

**Initial Command:**

```
/ban <Who do you want to ban?> <Reason for ban?>
```

1. **Prompt 1:** "Who do you want to ban?" → Player enters `Steve`
2. **Prompt 2:** "Reason for ban?" → Player enters `Griefing`
3. **Execution:** `/ban Steve Griefing`

***

## Menu Plugin Integration (e.g., DeluxeMenus)

You can use CommandPrompter with menu plugins (DeluxeMenus, ChestCommands, Citizens) to make static buttons interactive.

### DeluxeMenus Example

Add prompt tags directly to the click command:

```yaml
  'ban_button':
    material: BARRIER
    slot: 13
    display_name: '&cBan a Player'
    left_click_commands:
      - '[close]'
      - '[player] ban <a:Who do you want to ban?> <Reason?>'
```

### Bypassing Command Listeners (Fallback)

If a menu plugin dispatches commands directly without firing command events, CommandPrompter will not intercept it. In this case, use **Delegate Commands** (`/consoledelegate` or `/playerdelegate`):

```yaml
    left_click_commands:
      - '[close]'
      - '[console] consoledelegate %player_name% ban <a:Who do you want to ban?> <Reason?> %target_player%'
```

***

## Prompt Types

Change how the player is prompted by adding a **Prompt Key** prefix inside the prompt tag (e.g., `<a:Who do you want to ban?>` opens an Anvil GUI).

### Available Prompt Keys

* `(empty)` - Chat Prompt (default)
* `a:` - [Anvil UI](/commandprompter/prompts/anvil-ui-prompt.md)
* `s:` - [Sign UI](/commandprompter/prompts/sign-ui-prompt.md)
* `p:` - [Player UI](/commandprompter/prompts/player-ui-prompt.md) (Opens a GUI with player heads)
* `d:` - [Dialog UI](/commandprompter/prompts/dialog-ui-prompt.md) (Customizable forms)

To learn more about input validation and post-commands, see [Arguments](/commandprompter/getting-started/arguments.md).


---

# 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/getting-started/usage.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.
