# commands

PracticeBot uses three command namespaces:

* `/spawnbot` for quick player spawning
* `/practicebot` or `/pb` for player menu/info/help
* `/practicebot-admin` or `/pbadmin` for staff tools

## Player commands

| Command             | Alias                | Permission                                                        | Description                       |
| ------------------- | -------------------- | ----------------------------------------------------------------- | --------------------------------- |
| `/spawnbot`         | `/bot`               | any spawn permission                                              | Opens the bot type selection GUI. |
| `/spawnbot normal`  | `/bot normal`        | `practicebot.spawn.normal` or configured generic spawn permission | Spawns a Normal PvP bot.          |
| `/spawnbot crystal` | `/bot crystal`       | `practicebot.spawn.cpvp` or configured generic spawn permission   | Spawns a Crystal PvP bot.         |
| `/pb spawn`         | `/practicebot spawn` | any spawn permission                                              | Opens the bot type selection GUI. |
| `/pb info`          | `/practicebot info`  | none by default                                                   | Shows plugin and Citizens status. |
| `/pb help`          | `/practicebot help`  | none by default                                                   | Shows player help.                |

## Admin commands

| Command                          | Permission                                   | Description                                                           |
| -------------------------------- | -------------------------------------------- | --------------------------------------------------------------------- |
| `/pbadmin help`                  | `practicebot.admin` or relevant admin access | Shows admin help.                                                     |
| `/pbadmin inventory`             | `practicebot.admin`                          | Opens the default bot inventory/armor trim editor.                    |
| `/pbadmin egui`                  | `practicebot.admin`                          | Opens the GUI editor.                                                 |
| `/pbadmin reload`                | `practicebot.admin`                          | Reloads config, messages, GUI files, and templates.                   |
| `/pbadmin despawn <world>`       | `practicebot.admin.despawn`                  | Despawns all PracticeBot NPCs in a world and cancels queued respawns. |
| `/pbadmin despawn <world> [bot]` | `practicebot.admin.despawn`                  | Despawns one named bot in a world.                                    |
| `/pbadmin license`               | `practicebot.admin.license`                  | Shows license status.                                                 |
| `/pbadmin license set <key>`     | `practicebot.admin.license`                  | Saves and validates a license key.                                    |
| `/pbadmin license refresh`       | `practicebot.admin.license`                  | Forces a license recheck when needed.                                 |

## Template commands

| Command                                                                         | Permission                          | Description                                     |
| ------------------------------------------------------------------------------- | ----------------------------------- | ----------------------------------------------- |
| `/pbadmin template create <template>`                                           | `practicebot.admin.template.create` | Starts a live template creation session.        |
| `/pbadmin template edit <template>`                                             | `practicebot.admin.template.edit`   | Opens an existing template in the editor.       |
| `/pbadmin template cancel`                                                      | `practicebot.admin.template.cancel` | Cancels your active editor session.             |
| `/pbadmin template delete <template>`                                           | `practicebot.admin.template.delete` | Deletes a saved template.                       |
| `/pbadmin template spawn <template> [target]`                                   | `practicebot.admin.template.spawn`  | Spawns a template bot at your current location. |
| `/pbadmin template spawn <template> [target] <world> <x> <y> <z> <yaw> <pitch>` | `practicebot.admin.template.spawn`  | Spawns a template bot at exact coordinates.     |

## Template spawn target rules

Template target behavior depends on `target-binding`:

| `target-binding` | Explicit target allowed? | Behavior                                                                                                                                                  |
| ---------------- | -----------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `REQUIRED`       |                      Yes | The template needs a live player target. If no target is provided in-game, the command sender is used when possible. Console must provide a valid target. |
| `NONE`           |                       No | The template does not accept an explicit target. It can operate without a bound player target.                                                            |
| `BOT`            |                       No | The template is intended for bot-targeting behavior.                                                                                                      |

## Coordinate order

The coordinate form uses this order:

```
/pbadmin template spawn <template> [target] <world> <x> <y> <z> <yaw> <pitch>
```

{% hint style="warning" %}
The command usage is `yaw` then `pitch`. Do not reverse them when spawning templates from console or command blocks.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://edelweiss-network.gitbook.io/practicebot/server-owner-guide/commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
