Skip to content

Vault Economy Hook

Jan Kluka edited this page Jul 5, 2026 · 2 revisions

Vault Economy Hook

The Vault Economy Hook is a free addon for X-Prison that bridges the Vault economy API into X-Prison's currency system. Once installed, any Vault-compatible economy plugin (EssentialsX Economy, CMI Economy, etc.) is automatically available as an X-Prison currency under the internal name vault.

This is useful if you want X-Prison features such as Auto-Sell, rank-up costs, or multipliers to work with your existing Vault-based economy rather than (or alongside) X-Prison's own token/gem currencies.


Requirements

Requirement Notes
X-Prison Any supported version
Vault spigotmc.org/resources/vault.34315
A Vault Economy provider EssentialsX, CMI, or any other economy plugin that registers with Vault

Installation

  1. Make sure Vault and a Vault Economy provider are already installed.
  2. Download XPrisonVaultEconomyHook-*.jar from the Releases page or your download platform.
  3. Place the JAR inside plugins/X-Prison/addons/.
  4. Restart the server (do not use /reload).
  5. The addon registers the Vault currency with X-Prison automatically. A warning is printed to console if Vault or the economy provider is not found.

Configuration

On first start the addon generates plugins/X-Prison/addons/<addon-folder>/config.yml:

# Which X-Prison currency name the Vault economy should be registered as.
#
#  - "vault"  -> adds Vault as a SEPARATE currency. Nothing else changes until you
#                point a config (ranks.yml, autosell.yml, ...) at "vault".
#  - "money"  -> Vault transparently REPLACES the built-in 'money' currency. Every
#                config that already uses 'money' instantly runs on Vault, no edits.
#                NOTE: any 'money' balances stored in X-Prison's database are ignored
#                from then on (balances come from Vault). This is not reversible.
#
# You may also use "tokens" or "gems" to back those built-in currencies instead.
currency-name: "vault"

# Optional display overrides. Leave blank to use Vault's own formatting/names.
display-name: ""   # e.g. "Money"
prefix: ""         # e.g. "$"
suffix: ""         # e.g. " coins"

Choosing currency-name

Value Behaviour
vault (default) Vault is added as a separate currency. Existing built-in currencies are untouched. You opt in per-feature by setting currency: "vault" in that feature's config.
money / tokens / gems Vault replaces that built-in currency. Because every config that already references it (e.g. ranks.yml, prestiges.yml, autosell.yml, rebirths.yml, multipliers.yml) keeps working unchanged, your whole server economy runs on Vault with zero config edits.
any other name Registers Vault as a brand-new currency under that name.

⚠️ Replacing a built-in currency is one-way. When Vault takes over a name like money, balances previously stored for that currency in X-Prison's database are ignored from then on — all balances are read from and written to Vault. A warning is printed to console when this happens.

Display overrides

By default the currency display name, suffix, and number format come straight from your Vault economy provider. Set display-name, prefix, or suffix to override them (e.g. show a $ prefix). Leave them blank to keep the Vault defaults.


Usage

After installation, the configured currency name (default vault) is available in any X-Prison configuration that accepts a currency name.

Examples:

autosell.yml — pay players in Vault money:

currency: "vault"

ranks.yml — set rank-up costs in Vault money:

  currency: "vault"

If you instead set currency-name: "money" in the addon config, you don't need to edit anything — every feature that already uses money will run on Vault automatically.


Notes

  • Currency name matching is case-insensitive. The default registered name is vault.
  • Vault's fractionalDigits() value determines the decimal places in the number format.
  • Balances are stored and managed entirely by the Vault Economy provider — X-Prison does not maintain a separate balance for a Vault-backed currency.
  • Rank multipliers and other per-currency settings (e.g. in multipliers.yml) continue to apply to a replaced currency because the name is unchanged.
  • If Vault or the economy provider is absent at startup, the addon prints a warning and the currency is not registered (no crash).

XPrison Logo

General

Modules

Default Configs

Enchant Configs — Passive

Enchant Configs — Currency Rewards

Enchant Configs — Key & Item Rewards

Enchant Configs — Area of Effect

Enchant Configs — Multipliers

Enchant Configs — Templates

Enchant Configs — Addons

Addons

Support

For Developers

Others

Clone this wiki locally