# 🤖 Commands

## Commands

The following list shows all available commands for the plugin.

**Command alias:** `/phoenixshop`, `/phoenixs`, `/pshop`

<> - Required \
\[] - Optional

**Player Commands**

| Command | Description |
| ------- | ----------- |
| `/<shop command> [player]` | Opens that shop, such as `/shop`. |
| `/pshop open <shop> [category] [player]` | Opens a shop, or one of its categories. |
| `/pshop buy <shop> <category> <item> [amount]` | Buys an item without opening the shop. |
| `/pshop sell <shop> <category> <item> [amount]` | Sells an item without opening the shop. |
| `/sell hand` | Sells the item in your hand. |
| `/sell handall` | Sells every stack identical to the item in your hand. |
| `/sell inventory` | Sells everything in your inventory. |
| `/sell menu` | Opens the sell menu. |
| `/pshop search [terms]` ⭐ | Searches for an item across every shop. |
| `/pshop search hand` ⭐ | Searches every shop for the item in your hand. |
| `/pshop undo` ⭐ | Reverses your last transaction. |
| `/pshop alerts toggle` ⭐ | Turns restock and sale alerts off or on. |
| `/pshop forms` | Switches between Bedrock forms and chest menus. |

**Admin Commands**

| Command | Description |
| ------- | ----------- |
| `/pshop editor` | Opens the in-game editor. |
| `/pshop editlayout <shop> <menu>` | Edits the layout of a shop menu in-game. |
| `/pshop reload` | Reloads config.yml, the shops and the menus from disk. |
| `/pshop doctor` | Checks the license, economy, database, shops and add-ons and prints one line per check. Requires `phoenixshop.admin`. See [Doctor and Dashboard](https://www.phoenixplugins.com/docs/phoenix-plugins/doctor-and-dashboard). |
| `/pshop changelog` | Opens the list of released builds and their changes. |
| `/pshop link` | Lite only. Links this server to your Phoenix Plugins account for 5 more chest shops per player. See [Linking a Lite Server](licensing.md#linking-a-lite-server). |
| `/pshop addons` ⭐ | Lists the official add-ons, green when installed and gray when not, then any third-party add-ons. Clicking an official add-on opens its page. |
| `/pshop history [player]` | Opens the purchase history. |
| `/pshop history export [player] [shop]` ⭐ | Exports the purchase history to the exports folder. |
| `/pshop prices` | Opens the price generator. |
| `/pshop audit` ⭐ | Looks for money loops in the prices. |
| `/pshop limits reset <player> [shop] [category] [item]` ⭐ | Resets a player's buy and sell limits. |
| `/pshop stock set <shop> <category> <item> <amount>` ⭐ | Sets how many of an item are left. |
| `/pshop stock restock <shop> <category> <item>` ⭐ | Restocks an item now. |
| `/pshop editshop` | Edits the Sign Shop or chest shop you are looking at. |
| `/pshop webhooktest` ⭐ | Posts a test message to the Discord webhooks. |
| `/pshop database import sqlite [confirm]` ⭐ | Copies the old SQLite data into the MySQL or MariaDB database. See [Moving from SQLite to MySQL](../configurations/main-configuration.md#moving-from-sqlite-to-mysql). |

On Lite, `/pshop addons`, `/pshop audit`, `/pshop limits`, `/pshop stock` and `/pshop history export` reply with a link to the Premium page instead.

**Chest Shop Commands**

| Command | Description |
| ------- | ----------- |
| `/chestshop notifications` | Opens the menu that turns each kind of [owner notice](../main-features/player-shops/trading.md#owner-notices) about your shops on or off. |
| `/chestshop list [search]` | Lists every player shop, or those whose item, owner or name matches. Left-click an entry to teleport, right-click it to trade remotely. |
| `/chestshop editor` | Opens the [editor](../main-features/player-shops/edit-player-shop.md) of the chest shop you are looking at, sign or container, the same as right-clicking your own sign. Admins can open any shop's editor this way. |
| `/chestshop price <buy\|sell> <price>` | Sets a price on the chest shop you are looking at. |
| `/chestshop amount <amount>` | Sets how many items the chest shop you are looking at trades per click. |
| `/chestshop mode <buy\|sell\|both>` | Sets the mode of the chest shop you are looking at. |
| `/chestshop name <name>` | Names the chest shop you are looking at, `-` clears it. |
| `/chestshop discount <percent> <length>` | Starts a timed discount on the chest shop you are looking at, `off` ends it. ⭐ |
| `/chestshop find [search] [selling\|buying]` | Opens a menu of the shops that sell and buy an item, found by its name, material or custom id. Without a search it uses the one in your hand. |
| `/chestshop market` | Opens the market: every traded item with its cheapest seller and best buyer. ⭐ |
| `/chestshop transfer <player>` | Hands the player shop you are looking at to another player. |
| `/chestshop tp [shop]` | Teleports to a chest shop, the same as clicking it in the list. Tab completion lists your own shops, by name with spaces as `_`, or by a short code for a shop without a name; admins get every shop. The **\[Teleport]** on an owner notice runs it. With no shop named, it goes to the shop of your latest stock warning. |
| `/chestshop transferall <from> <to>` | Moves every player shop of one player to another. |
| `/chestshop purge [days] [confirm]` | Counts, then with `confirm` removes, the player shops of owners who have not played for that many days. ⭐ |
| `/chestshop clean [confirm]` | Counts, then with `confirm` removes, the shops in loaded chunks that sell to players and hold less than one trade. |
| `/chestshop removeall <player> [confirm]` | Counts, then with `confirm` removes, every player shop that player owns. |
| `/chestshop ban <player>`, `/chestshop unban <player>` | Stops a player from making chest shops and trading at any chest shop, or lets them again. |
| `/chestshop removeworld <world> [confirm]` | Counts, then with `confirm` removes, every chest shop in that world, admin shops included. |

## Chest Shop Command

The player shop commands are under `/chestshop`, alias `/cs`. Both names can be changed, or the command turned off, in the commands section of config.yml, see [Chest Shop Command](../main-features/player-shops/settings.md#chest-shop-command). The details of each are on [Player Shops](../main-features/player-shops/README.md).

## Shop Commands

Every shop registers its own command, named after the shop's open command rather than its identifier, so renaming a shop does not move its command. Adding the player's name opens the shop for them, which needs `phoenixshop.command.open-others`.

If another plugin already owns that command, the shop gets none and the console says so. The shop is still reachable with `/pshop open <shop>`.

A category can have an [open command](../main-features/categories/edit-category.md#open-command) of its own in the same way. A command a shop already uses is not given to a category.

`/pshop open` works from the console as long as a player is named. When its second word is not a category of the shop but is an online player, the shop's main menu opens for that player, so `/pshop open <shop> <player>` keeps working.

## Quick Buy and Sell

`/pshop buy` and `/pshop sell` trade one item by its shop, category and item identifier, and tab complete each in turn. The `amount` is in items and is rounded down to whole lots, with at least one lot. Without it, one lot is traded.

Everything a trade in the menu checks still applies: the shop's conditions, requirements, stock, limits and prices, along with the messages and the shop and category actions. A disabled shop, category or item refuses.

The limits and stock commands are covered on [Stock & Restock](../main-features/items/stock-and-restock.md#commands), and the alerts command on [Restock & Sale Alerts](../features/restock-and-sale-alerts.md).

## Arguments

| Argument | Accepts |
| -------- | ------- |
| `<menu>` | `main`, `buy`, `sell`, `bulk-buy`, `bulk-sell`, `sell-menu`, or the identifier of one of the shop's categories. |
| `[player]` in history | A player name, or `*` for everyone. |

`/pshop forms` only works for Bedrock players, and only while Bedrock forms and the opt-out are both enabled in config.yml.

> **Info:**
`/sell` takes over the command from any other plugin that registered it first. That plugin's own command stays reachable with its prefix, such as `/essentials:sell`.

## Add-on Commands

The add-ons register commands of their own, documented on each add-on's page. Add-ons load on Premium only.

| Add-on | Commands |
| ------ | -------- |
| AutoSell | `/autosell`, `/pshop autosell`, `/pshop sellchest` |
| Rotating Shop ⭐ | `/rotatingshop`, `/rshop` |
| Sell Boosters ⭐ | `/sellbooster`, `/sellboosters` |
| Sell Wands ⭐ | `/sellwand`, `/sellwands` |

Source: https://www.phoenixplugins.com/docs/phoenix-shop/plugin-information/commands