> For the complete documentation index, see [llms.txt](https://docs.xandtech.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xandtech.fr/home/xstash/chests-module/admin-tools.md).

# Admin Tools

## `/xstash view <player> [page]`

Requires `xstash.admin`. Opens a management view of a target player's chests — works even if they're currently offline (their data is loaded on demand).

**The selector** lists every chest slot from 1 up to `chests.max-amount`, locked or not:

* **Left-click a locked chest** → grants access to it (same as a purchase, no charge).
* **Left-click an unlocked chest** → opens its real contents, directly editable.
* **Right-click an unlocked chest** → revokes access. This only ever clears a *purchased* flag — it can't take away access granted by a rank permission (that has to be done in your permissions plugin).
* **Shift + right-click** → renames the chest (same chat prompt as the player-facing rename).
* **Middle-click** → opens the icon picker to change the chest's icon.

**The content view** is a full-size grid (sized to the server's absolute `chests.max-rows`, so nothing is ever hidden regardless of the target's own current row permission) with the first row reserved for navigation: previous/next chest number and a back button to the selector. Every other slot is the target's real stored items — take from it, add to it, it's a genuinely live inventory over their actual data.

{% hint style="warning" %}
Since permission-granted access (as opposed to a purchase) can only be computed for an *online* player, a chest a currently-offline target only has through a rank permission may show as locked in the admin selector until they log back in. Purchased access is always accurate either way.
{% endhint %}

### Live, bidirectional sync

Both the admin selector/content view and the target's own regular chest view (if they have it open at the same time) refresh automatically about once a second — a deposit made on either side shows up on the other without either party needing to close and reopen anything.

## `/xstash logs <player> [page]`

Requires `xstash.admin`. Shows a paginated history of deposits, withdrawals, and sales, per chest — who did what, when, in which chest, and for how much (for sales). Controlled by `chests/config.yml`:

```yaml
logging:
  enabled: true
  log-deposits: true
  log-withdrawals: true
  log-sell-all: true
  retention-days: 30
```

Entries older than `retention-days` are pruned automatically once a day.

## `/xstash export <csv|yaml|json> [player]`

Requires `xstash.admin`. Dumps the same chest transaction log as `/xstash logs` above — deposits, withdrawals and sales — to a timestamped file in `plugins/XStash/exports/`, e.g. `exports/chest-log_2026-08-24_17-38-27.csv`.

* With a `player` argument, only that player's history is exported.
* Without one, every player's history is exported at once (ignores `logging.retention-days` pruning — it dumps whatever's currently stored).

```
/xstash export csv
/xstash export json Steve
/xstash export yaml
```

{% hint style="info" %}
If `logging.enabled` is off, or an action's own `log-deposits`/`log-withdrawals`/`log-sell-all` toggle is off, nothing was ever recorded for it and it won't appear in the export either — the export reads from the same log the `logging` section controls.
{% endhint %}

## `/xstash reload`

Requires `xstash.admin`. Reloads XStash's own configuration files at runtime. Doesn't need a full server restart for config changes — but if you've just replaced the jar itself, restart the server properly (see [Installation & Setup](/home/xstash/getting-started/getting-started.md)).

## `/xstash backpack [player]`

See [Travel Backpack](/home/xstash/chests-module/travel-backpack.md).


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.xandtech.fr/home/xstash/chests-module/admin-tools.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
