# 🤖 Commands

## Commands

The following list shows all available commands for the plugin.

**Command alias:** `/phoenixcrates`, `/phoenixc`, `/crate`, `/crates` , `/pcrate` ,`/pcrates`&#x20;

<> - Required \
\[]  - Optional<br>

\[-s] - Flag to run a command silently from the user.

\*1 - Supports offline players and players with a full inventory via the Crate Claim Add-on.
\*2 - IP Limit, so bots won't get the key/reward/crate too.

## Player Commands

**Crate Commands**

| Command | Description |
| ------- | ----------- |
| /crates virtualKeys | Opens a menu with all your virtual keys. |
| /crate open \<crate_id> | Open a crate virtually |
| /crates forms | Bedrock players only: switches between Bedrock forms and chest menus. Needs the Bedrock opt out to be allowed. |

## Crate Commands

**Crate Commands**

| Command | Description |
| ------- | ----------- |
| /crates createCrate \<crate_id> | Create a new crate. |
| /crates deleteCrate \<crate_id> | Delete an existing crate. |
| /crates editCrate \<crate_id> | Opens the in-game editor directly for the specified crate. |
| /crates giveCrate \<crate_id> \<player> \[amount] \[-s] | Gives a player a crate that they can place. |
| /crates giveCrateAll \<crate_id> \[amount] \[-s] | Gives everyone online a crate that they can place. |
| /crates giveReward \<crate_id> \<reward\_id> \<player> | Gives a player a specific reward from a crate. \*1 |
| /crates giveRandomReward \<crate_id> \<player> \[-s] | Gives a player a random reward from a crate. |
| /crates preview \<crate_id> \[player] | Opens the preview menu of a crate for the player. |
| /crates open \<crate_id> | Opens the nearest placed crate of that type for yourself. |
| /crates resetCooldown \<crate_id> \<player> \[-s] | Resets the open cooldown of a crate for a specific player. |
| /crates resetGlobalWinLimit \<crate_id> \<reward_id> | Reset the global win count of a reward. |
| /crates resetGlobalWinLimitCooldown \<crate_id> \<reward_id> | Reset the global win limit cooldown of a reward. |
| /crates resetPlayerWinLimit \<crate_id> \<reward_id> \<player> | Reset a player's win count for a reward. |
| /crates resetPlayerWinLimitCooldown \<crate_id> \<reward_id> \<player> | Reset a player's win limit cooldown for a reward. |
| /crates restartCooldowns \<crate_id> \<reward_id> | Restart the cooldowns for a specific/every reward. |
| /crates setGlobalWinLimit \<crate_id> \<reward_id> \<amount> | Set the global win count of a reward. |
| /crates setPlayerWinLimit \<crate_id> \<reward_id> \<player> \<amount> | Set a player's win count for a reward. |
| /crates resetOpenings \<player \| \*> \[crate_id \| \*] \[confirm] | Reset a player's crate openings, for one crate or all of them. `*` resets every player and needs `confirm`. |
| /crates setOpenings \<player> \<crate_id> \<amount> | Set how many times a player opened a crate. |
| /crates attachCrate \<crate_id> | Attach a crate to the block you are looking at. |
| /crates detachCrate | Detach the crate from the block you are looking at. |
| /crates placeCrate \<crate_id> \<world> \<x> \<y> \<z> \[facing] \[permanent\|temporary] | Place a crate at a specific world location. A temporary crate is not saved and is gone after a restart. |
| /crates removeCrate \<world> \<x> \<y> \<z> | Remove the crate at a specific world location. |
| /crates summonCrate \<crate_id> \<world> \<x> \<y> \<z> | Summon a crate item at a world location. |
| /crates summonReward \<crate_id> \<reward_id> \<world> \<x> \<y> \<z> | Summon a reward display item at a world location. |
| /crates testOpen \<crate_id> | Plays the opening of the nearest placed crate of that type for you, without a key. Nothing is given, counted or announced. See [Crates](../main-features/crates/README.md#test-open). |
| /crates simulate \<crate_id> \[count] | Rolls the crate many times without giving anything and shows how often each reward came up. See [Rewards](../main-features/rewards/README.md#simulate-the-odds). |
| /crates brokenRewards | Checks every reward again and lists the broken ones with the reason. See [Rewards](../main-features/rewards/README.md#broken-rewards). |

## Key Commands

**Key Commands**

| Command | Description |
| ------- | ----------- |
| /crates editKey \<key_id> | Opens the in-game editor directly for the specified key. |
| /crates giveKeyAll \<key_id> \[amount] \[-s] | Gives everyone online a specific number of crate keys. \*1 |
| /crates giveKey \<key_id> \<player> \[amount] \[-s] | Gives a player a specific amount of crate keys. \*1 \*2 |
| /crates takeKey \<key_id> \<player> \[amount] \[-s] | Takes a specific amount of keys from a player. |
| /crates setKey \<key_id> \<player> \<amount> | Set a specific amount of Virtual Keys to the user. |
| /crates resetKeyAll \<key_id> | Resets a specific virtual key back to 0 for all players, online and offline. |
| /crates checkKeys \<player> | Check the virtual keys of a user. |
| /crates virtualKeys | Opens a menu showing your current virtual keys. |
| /crates payKey \<key_id> \<player> \[amount] | Pay virtual keys to another player. |
| /crates summonKey \<key_id> \<world> \<x> \<y> \<z> | Summon a key item at a world location. |

## Reroll Commands

**Reroll Commands**

| Command | Description |
| ------- | ----------- |
| /crates giveReroll \<crate_id> \<player> \[amount] | Gives a player a specific amount of available rerolls. |
| /crates takeReroll \<crate_id> \<player> \[amount] | Takes a specific amount of rerolls from a player. |

## General Commands

**General Commands**

| Command | Description |
| ------- | ----------- |
| /crates editor | Opens the in-game editor of the plugin. |
| /crates editLayout \<menu> | Opens a menu in the [In-Game Menu Editor](../configurations/in-game-menu-editor.md). |
| /crates reload | Reload the Phoenix Crates plugin. |
| /crates setLanguage \<language> | Switch the plugin language. See [Languages](../configurations/languages.md). |
| /crates migrate \<source> \[confirm] | Import from another crate plugin. Without `confirm` it only previews. See [Migration](../migration.md). |
| /crates addons | List the official add-ons, which of them are installed, and any third-party add-ons. |
| /crates changelog | Open the list of released builds and their changes. |
| /crates link | Lite only. Link this server to your Phoenix Plugins account for one more crate. See [Licensing](licensing.md#linking-a-lite-server). |
| /crates backup | Saves a zip backup of the plugin files. See [Backups & Health Check](backups-and-health-check.md). |
| /crates doctor \[file] | Shows the health of the plugin. With `file` it also saves the report for a support ticket. See [Backups & Health Check](backups-and-health-check.md#health-check) and [Doctor and Dashboard](https://www.phoenixplugins.com/docs/phoenix-plugins/doctor-and-dashboard). |
| /crates dashboard \[link] | Shows whether this server is connected to the web dashboard. With `link` it gives you a link and a code to connect the server. See [Doctor and Dashboard](https://www.phoenixplugins.com/docs/phoenix-plugins/doctor-and-dashboard). |

The reload reads its files in the background, so the server keeps running while it works. Crates cannot be opened until it finishes, and a second reload is refused while one is running. The editor's reload button works the same way.

> **Info:**
Commands that change every player's data, such as `resetKeyAll` and `resetOpenings *`, work through the players in batches and show their progress on the action bar, or in the console every 10%. Only one can run at a time, so a second one is refused until the first finishes.

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