> For the complete documentation index, see [llms.txt](https://docs.cozycrafters.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cozycrafters.net/plugin-docs/cozytowns/commands.md).

# Commands

## Commands

### Main Commands

| Command                    | Aliases                   | Permission                      | Who Uses It                  | Description                                                                                               |
| -------------------------- | ------------------------- | ------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------- |
| `/town`                    | `/t`                      | `cozytowns.use`                 | Player; console gets help    | Opens the town menu for players. With subcommands, manages towns.                                         |
| `/towns`                   | None documented in source | `cozytowns.info` for finder use | Player                       | Opens the public town finder when enabled. Also accepts `/towns admin ...` as a compatibility admin path. |
| `/townadmin <subcommand>`  | None documented in source | `cozytowns.admin`               | Admin or console, except spy | Preferred admin command entry point.                                                                      |
| `/townsadmin <subcommand>` | None documented in source | `cozytowns.admin`               | Admin or console, except spy | Equivalent admin command entry point.                                                                     |

### Player Commands

All `/town` subcommands require the base `/town` permission check. The table lists the effective permission confirmed in source.

| Command                              | Aliases                                  | Permission                | Who Uses It       | Description                                                                                                                  |
| ------------------------------------ | ---------------------------------------- | ------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `/town help`                         | None documented in source                | `cozytowns.use`           | Player or console | Shows available commands.                                                                                                    |
| `/town menu`                         | `/town gui`                              | `cozytowns.use`           | Player            | Opens the town GUI.                                                                                                          |
| `/town create <name>`                | None documented in source                | `cozytowns.create`        | Player            | Creates a town. Source docs note this may cost money.                                                                        |
| `/town invite <player>`              | None documented in source                | `cozytowns.use`           | Player            | Invites a player to the town.                                                                                                |
| `/town accept`                       | None documented in source                | `cozytowns.use`           | Player            | Accepts a town invite.                                                                                                       |
| `/town deny`                         | None documented in source                | `cozytowns.use`           | Player            | Denies a town invite.                                                                                                        |
| `/town leave`                        | None documented in source                | `cozytowns.use`           | Player            | Leaves the current town.                                                                                                     |
| `/town kick <player>`                | None documented in source                | `cozytowns.use`           | Player            | Kicks a citizen. Source docs mark this as mayor-only.                                                                        |
| `/town transfer <player>`            | None documented in source                | `cozytowns.use`           | Player            | Transfers town ownership. Source docs mark this as mayor-only.                                                               |
| `/town disband`                      | None documented in source                | `cozytowns.use`           | Player            | Disbands the town. Source docs mark this as mayor-only.                                                                      |
| `/town claim`                        | None documented in source                | `cozytowns.use`           | Player            | Links the GriefPrevention claim the player is standing in.                                                                   |
| `/town unclaim`                      | None documented in source                | `cozytowns.use`           | Player            | Unlinks the GriefPrevention claim the player is standing in.                                                                 |
| `/town setspawn`                     | None documented in source                | `cozytowns.use`           | Player            | Sets the town spawn. Source docs mark this as mayor-only.                                                                    |
| `/town spawn`                        | None documented in source                | `cozytowns.use`           | Player            | Teleports to the town spawn.                                                                                                 |
| `/town rename <name>`                | None documented in source                | `cozytowns.use`           | Player            | Renames the town. Source docs mark this as mayor-only and note this may cost money.                                          |
| `/town settag <tag>`                 | None documented in source                | `cozytowns.use`           | Player            | Sets the town tag. Source docs mark this as mayor-only.                                                                      |
| `/town setcolor <hex>`               | None documented in source                | `cozytowns.use`           | Player            | Sets the town color. Source docs mark this as mayor-only.                                                                    |
| `/town setbanner`                    | None documented in source                | `cozytowns.use`           | Player            | Sets the town banner from the held item. Source docs mark this as mayor-only.                                                |
| `/town setmotto <text>`              | None documented in source                | `cozytowns.use`           | Player            | Sets the town motto. Source docs mark this as mayor-only.                                                                    |
| `/town clearmotto`                   | None documented in source                | `cozytowns.use`           | Player            | Clears the town motto. Source docs mark this as mayor-only.                                                                  |
| `/town recruitment [status]`         | `/town recruit`                          | `cozytowns.use`           | Player            | Views or changes recruitment. Source docs mark changes as mayor-only.                                                        |
| `/town request <town>`               | `/town joinrequest <town>`               | `cozytowns.use`           | Player            | Requests to join a town.                                                                                                     |
| `/town requests`                     | None documented in source                | `cozytowns.use`           | Player            | Reviews pending join requests. Source docs mark this as mayor-only.                                                          |
| `/town finder`                       | None documented in source                | `cozytowns.info`          | Player            | Opens the town finder.                                                                                                       |
| `/town list`                         | None documented in source                | `cozytowns.info`          | Player or console | Lists towns.                                                                                                                 |
| `/town profile [town]`               | `/town info [town]`                      | `cozytowns.profile`       | Player or console | Players open a town profile menu; console receives text town info.                                                           |
| `/town info [town]`                  | Alias for `/town profile [town]`         | `cozytowns.profile`       | Player or console | Players open a town profile menu; console receives text town info.                                                           |
| `/town top`                          | None documented in source                | `cozytowns.info`          | Player or console | Shows town leaderboards.                                                                                                     |
| `/town history`                      | None documented in source                | `cozytowns.info`          | Player or console | Shows town history, such as motto history.                                                                                   |
| `/town bulletin ...`                 | `/town board`, `/town notices`           | `cozytowns.use`           | Player            | Manages the town bulletin board.                                                                                             |
| `/town visit <town>`                 | None documented in source                | `cozytowns.use`           | Player            | Visits a public town spawn.                                                                                                  |
| \`/town setvisits \<open             | closed>\`                                | None documented in source | `cozytowns.use`   | Player                                                                                                                       |
| \`/town setvisitping \<on            | off>\`                                   | None documented in source | `cozytowns.use`   | Player                                                                                                                       |
| `/town visitlog`                     | None documented in source                | `cozytowns.use`           | Player            | Shows recent visitors to the town.                                                                                           |
| `/town contracts`                    | `/town contract`, `/town jobs`           | `cozytowns.use`           | Player            | Opens town contracts.                                                                                                        |
| `/town contracts list [town]`        | `/town contract list`, `/town jobs list` | `cozytowns.info`          | Player or console | Lists active contracts for a town.                                                                                           |
| `/town ally <town>`                  | None documented in source                | `cozytowns.use`           | Player            | Proposes or handles an alliance. Source docs mark this as mayor-only.                                                        |
| `/town allies [town]`                | None documented in source                | `cozytowns.info`          | Player or console | Lists alliances.                                                                                                             |
| `/town unally <town>`                | None documented in source                | `cozytowns.use`           | Player            | Breaks an alliance. Source docs mark this as mayor-only.                                                                     |
| `/town vault [number]`               | None documented in source                | `cozytowns.use`           | Player            | Opens a town vault or the vault picker.                                                                                      |
| `/town vault rename <number> <name>` | None documented in source                | `cozytowns.use`           | Player            | Renames a vault. Source code restricts rename to the mayor.                                                                  |
| `/town vault log [number]`           | None documented in source                | `cozytowns.use`           | Player            | Shows recent vault activity.                                                                                                 |
| `/town role ...`                     | `/town roles ...`                        | `cozytowns.use`           | Player            | Lists, opens, creates, deletes, assigns, or clears cosmetic town roles. Create/delete/assign/clear are mayor-only in source. |
| `/town reload`                       | None documented in source                | `cozytowns.admin`         | Admin or console  | Reloads `config.yml`, `messages.yml`, and `contracts.yml`.                                                                   |

### Town Chat Commands

| Command               | Aliases                   | Permission      | Who Uses It | Description                                                                                                          |
| --------------------- | ------------------------- | --------------- | ----------- | -------------------------------------------------------------------------------------------------------------------- |
| `/townchat [message]` | `/tc [message]`           | `cozytowns.use` | Player      | Sends private chat to online members of the sender's town. With no message, toggles town chat mode.                  |
| `/allychat [message]` | None documented in source | `cozytowns.use` | Player      | Sends private chat to online members of the sender's town and allied towns. With no message, toggles ally chat mode. |

### Admin Commands

`/townadmin` and `/townsadmin` are the preferred admin commands. `/towns admin ...` is still accepted for compatibility.

| Command                                              | Permission        | Who Uses It      | Description                                                                                      |
| ---------------------------------------------------- | ----------------- | ---------------- | ------------------------------------------------------------------------------------------------ |
| `/townadmin addxp <town> <amount> [silent]`          | `cozytowns.admin` | Admin or console | Adds XP to a town.                                                                               |
| `/townadmin addxp_player <player> <amount> [silent]` | `cozytowns.admin` | Admin or console | Adds XP to the town of the specified player. Source docs recommend this for reward integrations. |
| `/townadmin setxp <town> <amount> [silent]`          | `cozytowns.admin` | Admin or console | Sets a town's XP.                                                                                |
| `/townadmin setxp_player <player> <amount> [silent]` | `cozytowns.admin` | Admin or console | Sets XP for the town of the specified player.                                                    |
| `/townadmin setlevel <town> <level> [silent]`        | `cozytowns.admin` | Admin or console | Sets a town's level.                                                                             |
| `/townadmin reset <town>`                            | `cozytowns.admin` | Admin or console | Resets town progression.                                                                         |
| `/townadmin info <town>`                             | `cozytowns.admin` | Admin or console | Shows admin town details.                                                                        |
| `/townadmin clearmotto <town>`                       | `cozytowns.admin` | Admin or console | Clears a town motto and motto history.                                                           |
| `/townadmin contracts list <town>`                   | `cozytowns.admin` | Admin or console | Lists a town's active contracts.                                                                 |
| `/townadmin contracts skip-cooldown <town>`          | `cozytowns.admin` | Admin or console | Skips contract cooldowns and generates replacements for a town.                                  |
| `/townadmin recruitment <town> [status]`             | `cozytowns.admin` | Admin or console | Views or changes a town's recruitment status.                                                    |
| `/townadmin bulletin delete <id>`                    | `cozytowns.admin` | Admin or console | Deletes any bulletin post by ID.                                                                 |
| `/townadmin spy`                                     | `cozytowns.admin` | Admin player     | Toggles private town and ally chat spy for the executing admin.                                  |

### Examples

| Example                                   | What It Does                                              |
| ----------------------------------------- | --------------------------------------------------------- |
| `/town`                                   | Opens the player's town menu.                             |
| `/town create Maple`                      | Creates a town named `Maple`.                             |
| `/town invite Steve`                      | Invites Steve to the town.                                |
| `/townchat Hello town`                    | Sends a private town chat message.                        |
| `/townchat`                               | Toggles town chat mode.                                   |
| `/allychat Hello allies`                  | Sends a private ally chat message.                        |
| `/town profile Maple`                     | Opens Maple's profile menu.                               |
| `/town visit Maple`                       | Visits Maple if visits are open and a spawn is available. |
| `/townadmin spy`                          | Toggles staff spy for private town and ally chat.         |
| `/townadmin addxp_player Steve 25 silent` | Adds 25 XP to Steve's town without chat feedback.         |


---

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

```
GET https://docs.cozycrafters.net/plugin-docs/cozytowns/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.
