# Commands & Permissions

## Commands & permissions

Quick-reference page. Most of these are detailed elsewhere — this is the at-a-glance summary you can keep open in a tab.

### Commands

All commands are prefixed `/tcpvc`. Use `/tcpvc help` in-game for the abbreviated version.

| Command                                            | Permission    | What it does                                                                                                                                                         |
| -------------------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/tcpvc gui`                                       | `tcpvc.admin` | Open the admin GUI (detailed walkthrough). First run on a player shows a welcome Dialog.                                                                             |
| `/tcpvc about`                                     | `tcpvc.admin` | Show the welcome Dialog manually (plugin version + quick-reference + Open GUI / Open docs / Close).                                                                  |
| `/tcpvc set <crate>`                               | `tcpvc.admin` | Register the looked-at Vault block as a crate of type `<crate>`. Range: 8 blocks. Aligns the vault's ominous BlockData flag to match the crate's configured tier(s). |
| `/tcpvc unset`                                     | `tcpvc.admin` | Unregister the looked-at Vault block. Strips its PDC and removes the hologram.                                                                                       |
| `/tcpvc list [page]`                               | `tcpvc.admin` | Paginated list of registered vaults in currently-loaded chunks (10 per page).                                                                                        |
| `/tcpvc preview <crate> [tier]`                    | `tcpvc.use`   | Browse a crate's prize list. Open to all players.                                                                                                                    |
| `/tcpvc key give <player> <crate> [tier] [amount]` | `tcpvc.admin` | Issue keys. Tier required when both are configured.                                                                                                                  |
| `/tcpvc key give-all <crate> [tier] [amount]`      | `tcpvc.admin` | Issue keys to every online player.                                                                                                                                   |
| `/tcpvc reset <crate> player <name>`               | `tcpvc.admin` | Reset one player's cooldown on every registered vault of the crate. Works for offline players.                                                                       |
| `/tcpvc reset <crate> all`                         | `tcpvc.admin` | Wipe every cooldown (per-player + server-wide lock + rewarded\_players NBT) on every registered vault of the crate.                                                  |
| `/tcpvc reset <crate> group <permission>`          | `tcpvc.admin` | Reset cooldowns for every player (online + offline via LuckPerms) holding the permission node. Falls back to online-only without LuckPerms.                          |
| `/tcpvc reload`                                    | `tcpvc.admin` | Reload `crates.yml` and `messages.yml` without restarting.                                                                                                           |
| `/tcpvc help`                                      | (any)         | Show the command help.                                                                                                                                               |

#### Notes

* **`<crate>`** — the crate id from `crates.yml`. Tab-completes against configured crates.
* **`[tier]`** — `normal` or `ominous`. Optional when the crate has only one tier configured.
* **`[amount]`** — 1..64. Default 1.
* **`/tcpvc set` and `/tcpvc unset`** are **player-only** commands — they need a looked-at block. The console can't run them.
* **`/tcpvc gui` and `/tcpvc about`** are also player-only — they open Dialogs / inventories which need a viewer.
* **`/tcpvc reset <crate> group <permission>`** requires LuckPerms installed for the offline-player resolution. Without LuckPerms the scope automatically narrows to online players + you get a one-line chat notice.

### Permissions

Set in your permissions plugin (LuckPerms, PermissionsEx, etc.) or `plugin.yml` of a separate permissions configuration.

| Permission              | Default  | What it grants                                                         |
| ----------------------- | -------- | ---------------------------------------------------------------------- |
| `tcpvc.admin`           | OP       | All administrative operations: GUI, set/unset, list, key give, reload. |
| `tcpvc.use`             | everyone | Open registered vaults, browse loot previews.                          |
| `tcpvc.bypass.droplock` | OP       | Pick up vault loot drops regardless of the owner-lock window.          |

#### How the open-flow permission gate works

Players need `tcpvc.use` to open vaults — but it defaults to `true` for everyone, so you don't usually grant it explicitly. Negate it (`tcpvc.use: false` in a LuckPerms group) only if you want to **deny** opening for specific players (e.g. jailed users, players in PvE-only regions).

#### How the bypass permission works

When a player's inventory is full and crate loot drops at their feet, the dropped items are **owner-locked** — only the original opener can pick them up for the configured grace window (`crates.drop-on-full-inventory.owner-grace-seconds` in `config.yml`, default 30 seconds).

`tcpvc.bypass.droplock` overrides this. Players with the permission can pick up any vault drop regardless of who opened it. Default OP — useful for staff cleaning up dropped items, or for players in a "shared loot" region.

### Tab completion

Every argument position has tab-completion:

* After `/tcpvc` → list of subcommands.
* After `/tcpvc key` → `give` / `give-all`.
* After `/tcpvc key give` → online player names.
* After `/tcpvc key give Steve` → configured crate ids.
* After `/tcpvc key give Steve common` → `normal` / `ominous`.
* After `/tcpvc key give-all` → configured crate ids.
* After `/tcpvc key give-all common` → `normal` / `ominous`.
* After `/tcpvc preview` → configured crate ids.
* After `/tcpvc preview common` → `normal` / `ominous`.
* After `/tcpvc set` → configured crate ids.
* After `/tcpvc reset` → configured crate ids.
* After `/tcpvc reset common` → `player` / `all` / `group`.
* After `/tcpvc reset common player` → online player names.

### Aliases

The command also responds to `/vaultcrate` and `/vaultcrates` — configured in `plugin.yml`. If those conflict with another plugin on your server, you can disable them by editing `plugins/TCP-VaultCrates/plugin.yml` after first boot, then restart.

***

Next: **config.yml reference →** · **messages.yml →**


---

# 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://darkstarworks.gitbook.io/plugins/mc/tcp-documentation/tcp-vaultcrates/installation/commands-and-permissions.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.
