-
Notifications
You must be signed in to change notification settings - Fork 58
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.
| 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 |
- Make sure Vault and a Vault Economy provider are already installed.
- Download
XPrisonVaultEconomyHook-*.jarfrom the Releases page or your download platform. - Place the JAR inside
plugins/X-Prison/addons/. - Restart the server (do not use
/reload). - 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.
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"| 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 likemoney, 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.
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.
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.
- 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).
- Currencies
- Ranks
- Prestiges
- Rebirths
- Mines
- AutoSell
- AutoMiner
- Enchants
- Pickaxe Levels
- Pickaxe Skins
- Pickaxe Quality
- Pickaxe Settings
- Gangs
- Multipliers
- Blocks
- Bombs
- History
- Mining Stats
- Nicknames
- Battle Pass
- Quests
- Daily Rewards
- Milestones
- config.yml
- autominer.yml
- autosell.yml
- block-rewards.yml
- enchants.yml
- currencies.yml
- multipliers.yml
- ranks.yml
- prestiges.yml
- pickaxe-levels.yml
- pickaxe-skins.yml
- pickaxe-quality.yml
- gangs.yml
- mines.yml
- bombs.yml
- blocks.yml
- history.yml
- logging.yml
- mining-stats.yml
- rebirths.yml
- battlepass.yml
- quests.yml
- dailyrewards.yml
- milestones.yml
- efficiency.json
- fortune.json
- unbreaking.json
- haste.json
- speed.json
- fly.json
- nightvision.json
- jumpboost.json
- autosell.json
- tokenfinder.json
- gemfinder.json
- salary.json
- charity.json
- blessing.json
- gangvaluefinder.json
- prestigefinder.json
