Move from another economy
Bring balances into ExyliaEconomy from Vault, EssentialsX, CMI or PlayerPoints, or move over from the ExyliaSurvivalCore economy module and an old config.yml.
You end up with your old economy's balances inside an ExyliaEconomy currency and Vault served by it. The same page covers a server coming from ExyliaSurvivalCore.
Before you start#
You need a stored currency to receive the balances, see Create a currency, and exyliaeconomy.admin. Run the import on the server where your players are: neither Vault nor PlayerPoints can list balances, so the import walks the server's own player list, and a player who never joined this server is not imported.
From Vault or PlayerPoints#
/economyadmin import <from> <into> adds every player's balance in one currency to a stored one. from can be any currency the server runs, including vault while EssentialsX or CMI still serves it, or points for PlayerPoints.
Keep the old economy serving for now
Leave EssentialsX, CMI or PlayerPoints installed, so vault or points still reads their balances.
Import
Run /economyadmin import vault dollars. It walks every player who has ever joined this server, reads their balance one at a time and deposits what is positive. Players on this server are paid at once; everybody else gets a queued change. The console names any balance over the target's ceiling, which is skipped.
Switch Vault over
Remove the old economy plugin, or turn Vault on top on in Economy settings, so the stored currency serves Vault. See Choose what Vault sees.
Check that it works#
Run /balance as a player who had money before: it shows the old amount in the target currency. /economy history <currency> <player> shows the line import:<from>, see Ledger.
Going further#
Run it only once#
An import is added, never set:
- a second import of the same pair is refused unless you add
again:/economyadmin import <from> <into> again; - with
again, only the players not imported yet are paid, so nobody is paid twice, even after an import that stopped halfway or one started on two servers at once; - an import between a currency and itself,
vaultinto the currency servingvaultincluded, is refused; - a second run typed while one is reading is refused: "That import is already running."
Each player imported is recorded in exylia_balance_imports, and the ledger reads import:<from>.
From ExyliaSurvivalCore#
ExyliaEconomy is the economy module of ExyliaSurvivalCore, as its own plugin. The balances, the queued changes and the ledger already lived in tables with plugin-neutral names (exylia_balances, exylia_balance_pending, exylia_ledger), so moving over is a matter of opening the same database.
Releases from 1.2.1 on no longer copy the survival core's database.yml, currencies, settings, messages or menus, and its exyliasurvivalcore.economy... permission names no longer grant anything. Move over with a release from before 1.2.1 on every server of the network at once, then update; or copy plugins/ExyliaSurvivalCore/database.yml here by hand, so the plugin opens the database the balances are in (see database), and recreate the currencies in /economyadmin. Grant the exyliaeconomy. nodes instead of the old ones.
Update every server together: servers tell each other about balance changes on a Redis channel whose key includes the plugin's name, so a server still running the old module does not hear a server running ExyliaEconomy, and the other way round.
The commands keep their names (/balance, /pay, /baltop, /wallet, /economy, /economyadmin and the currency commands), and so do the old admin spellings /eco give, /eco take, /eco set, /eco reset and /eco import, which reward and crate files on live servers are written with. The placeholders belong to this plugin now: %exyliasurvivalcore_economy_balance_<currency>% becomes %exyliaeconomy_economy_balance_<currency>%, and the same for the rest. See Placeholders.
An old config.yml#
A version before 1.2.0 kept the language, the debug switch, the /pay confirmation, the offline notice, banknotes and interest in config.yml. The first start of a newer one imports them into the database where nothing is set yet (the language and switches into Economy settings, the confirmation amounts, the banknote list and the interest blocks into each currency) and renames the file config.yml.migrated. A config.yml holding nothing but language is imported the same way. Edit them in /economyadmin from then on; the plugin writes no config.yml any more.
The first start's currency file
The currencies live in the database. The first time the tables are empty (a new server, or one whose survival core had no currencies to copy) the plugin imports a currencies.yml, in this order:
plugins/ExyliaEconomy/currencies.yml, if you put one there;- the shipped defaults:
dollars,shards,netherite_ingots, and thevaultandpointsoverlays.
The file is then renamed to currencies.yml.imported and never read again. Its layout, for a server that wants to prepare one:
stored:
gems:
name: Gem
plural: Gems
symbol: "◆"
icon: EMERALD
decimals: 0
format: "%amount% %symbol%"
compact-format: "%amount%%symbol%"
aliases: [gems, gem]
start: 0
max: -1
permission: ""
transfer:
enabled: true
minimum: 1
tax-percent: 0
exchange:
enabled: false
rates: {}
leaderboard: true
scope: global # global, group or server; the old 'networked: true/false' still reads
available-on: [] # groups or server ids it exists on; [] is every server
commands: true
items:
emeralds:
item: EMERALD # or a 'bytes:' snapshot of a custom item
name: Emerald
plural: Emeralds
icon: EMERALD
format: "%amount% %name%"
aliases: []
experience:
levels: false
points: true
display:
vault:
name: Dollar
plural: Dollars
symbol: "$"
decimals: 2
format: "%symbol%%amount%"
vault:
provide: gems
force: true
ledger:
enabled: trueA stored id that is not a-z, 0-9 and _ up to 32, or an item currency without an item, is skipped with a warning. A stored block without exchange.enabled reads it as on.
Something missing on this page? Tell us on Discord