> 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/reference/economy-and-selling.md).

# Economy & Selling

XStash uses [Vault](https://www.spigotmc.org/resources/vault.34315/) (money, works with any Vault-compatible economy) and/or [PlayerPoints](https://www.spigotmc.org/resources/playerpoints.80745/) (points) everywhere money changes hands. Neither is required — if the matching plugin isn't installed, purchases/sells using that currency are simply unavailable and the player sees a message instead of an error.

## Chest purchase prices — `chest-prices.yml`

```yaml
prices:
  - range: "6-10"
    currency: money
    amount: 20000

  - range: "11-15"
    currency: money
    amount: 50000

  - range: "16-20"
    currency: points
    amount: 350

  - range: "21"
    currency: placeholder
    value: "%vault_eco_balance%"
    amount: 100
```

`range` accepts a single chest number (`"7"`) or a range (`"6-10"`), checked in order — the first match wins. A chest number not covered by any range can't be purchased at all (permission-only, e.g. reserved for a VIP rank via `xstash.number_chest.<n>`). See [Chests → Overview & Access](/home/xstash/chests-module/chests.md#purchasing-individual-chests).

### `currency: placeholder` — condition-based purchase

Unlike `money`/`points`, `placeholder` isn't a spend — it's a **condition**. It requires a `value` field: any [PlaceholderAPI](/home/xstash/reference/placeholderapi.md) placeholder (your own economy, another plugin's currency, a stat, anything that resolves to a number). It's resolved for the buying player and compared to `amount` — if the resolved value is `>=` `amount`, the chest unlocks. **Nothing is withdrawn**, since XStash has no generic way to decrement an arbitrary placeholder — this is a wealth/progress gate, e.g. "own at least 1,000,000 on another server-wide balance", not an actual purchase. Requires PlaceholderAPI to be installed; otherwise that entry's purchase option is simply unavailable, same as `money`/`points` without their matching plugin.

## Item sell prices — `sell-prices.yml`

Shared by the chest utility bar's "sell-all" and every sack's "Quick sell":

```yaml
prices:
  - material: COBBLESTONE
    currency: money
    amount: 1
  - material: IRON_INGOT
    currency: money
    amount: 5
  - material: DIAMOND
    currency: points
    amount: 50
```

Only plain, unmodified stacks are sellable this way — a renamed/enchanted item, or one matched by Custom Model Data/`pdc:`/`ei:` inside a sack, is never swept up by "prices", even if its underlying material has an entry.

## Shop plugin fallback

For a material with **no** explicit entry in `prices` above, XStash can optionally ask an installed shop plugin what it's worth instead — so a server that already has its economy configured elsewhere doesn't need every item listed twice. Anything listed explicitly in `prices` always wins regardless.

```yaml
shop-integration:
  enabled: false
  currency: money   # money or points - shop plugins only give a raw number, no currency of their own
  order:
    - essentials
    - shopguiplus
    - economyshopgui
    - guishop
    - royaleeconomy
```

Tried in the listed order, first installed plugin that knows the item wins.

| Key              | Plugin                             | Confidence                                                                                                  |
| ---------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `essentials`     | EssentialsX `/worth` (`worth.yml`) | Solid — well-documented stable API, and most servers already have this filled in for `/sell`.               |
| `shopguiplus`    | ShopGUIPlus                        | Solid — stable public API.                                                                                  |
| `economyshopgui` | EconomyShopGUI(Premium)            | Best-effort — no single documented API across versions/builds; tries a few known candidate classes/methods. |
| `guishop`        | GUIShop                            | Best-effort.                                                                                                |
| `royaleeconomy`  | RoyaleEconomy                      | Best-effort.                                                                                                |

{% hint style="info" %}
Check your server log on startup — each provider logs which class/method it actually resolved (or a warning if none did). If a best-effort integration doesn't light up on your build of that plugin, `sell-prices.yml`'s `prices` list keeps working normally regardless.
{% endhint %}

**QuickShop is not supported.** It's built around player-run chest shops — there's no single global price per item (two players can sell the same material at two different prices in their own shops), which doesn't fit "the sell price of X" at all.

## Sell boost

A permission-driven percentage bonus on top of whatever price was found above (from `prices` or a shop plugin) — e.g. as a VIP perk.

```yaml
sell-boost:
  max-percent: 100   # safety cap, regardless of any permission node's own number
```

Grant `xstash.sell.boost.<percent>`, e.g. `xstash.sell.boost.10` for +10%. Same rule as `xstash.number_chest.<n>`/`xstash.number_row.<n>`: the **highest** value among a player's permissions wins, it does not stack. Applied to both the chest utility bar's "sell-all" and every sack's "Quick sell".


---

# 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/reference/economy-and-selling.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.
