Migration Guide

From CoinsEngine

Obfeco reads CoinsEngine's own data directly and brings over its currencies and every player's balances.

What you need

  • The plugins/CoinsEngine/ folder still on the server, with its config.yml, its currencies/ folder and its database. CoinsEngine itself doesn't have to be enabled.
  • If CoinsEngine used MySQL, that database reachable from this server. Obfeco reads the connection from CoinsEngine's config.yml (Database.Type and Database.MySQL.*).
  • If it used SQLite, its .db file in plugins/CoinsEngine/ (data.db or coinsengine.db are tried first, then any .db file).

Steps

  1. Back up both plugins' data folders (and the databases if you use MySQL).

  2. Make sure nobody is earning or spending while you migrate. A maintenance window or a whitelist is easiest.

  3. Preview what will come over:

    /obfeco scan coinsengine

    You get each CoinsEngine currency with its name, symbol, starting value and decimal setting, marked [New] or [Exists] depending on whether Obfeco already has a currency with that id. Add debug to print the currency ids found in the player data to the console.

  4. Run the migration:

    /obfeco convert coinsengine

    When it finishes you get the number of currencies migrated and players processed, with a per-currency breakdown.

  5. Set vault.primary-currency in config.yml to the currency CoinsEngine used for Vault, then remove CoinsEngine and restart.

What gets migrated

  • Currencies: every currency that has player balances. Missing ones are created in Obfeco using CoinsEngine's Name, Symbol, Start_Value and Decimals_Allowed. A currency that already exists in Obfeco (same id) keeps its Obfeco settings.
  • Balances: every positive balance. For each migrated player, the CoinsEngine balance replaces their Obfeco balance in that currency. Players with no CoinsEngine balance keep whatever they had.

Not migrated: CoinsEngine's per-currency permissions, commands, exchange rates, and anything else outside names, symbols, starting values, decimals and balances. New currencies use the default format %amount%%symbol%; adjust them in the Currency Manager GUI.

Running convert twice is safe: the second run writes the same balances again.

If the console says Migration failed, no balances were found to import. Check the database settings in CoinsEngine's config.yml and run /obfeco scan coinsengine debug.

Upgrading from before 26.10

Version 26.10 changed how balances are stored. The conversion runs once, automatically, on the first start of the new version:

  • SQLite / MySQL: the old layout had one table per currency (obfeco_<id>). Their rows are copied into a single obfeco_balances table in one transaction, and the schema version is recorded in obfeco_meta. The old tables are left in place, untouched, so you can drop them once you're happy.
  • YAML: the old layout had one file per currency (data/<currency>.yml) plus data/players.yml. Balances are rewritten as one file per player in data/players/, and the old files are moved to data/legacy-v1/.

Back up before updating, as with any storage change. Nothing to configure.

From other economy plugins

There's no built-in importer for other plugins. To move from EssentialsX or another Vault economy, copy balances over with that plugin's own export or a database query into obfeco_balances (player_uuid, currency_id, balance, last_updated as epoch milliseconds) while the server is stopped. currency_id is the lowercased Obfeco currency id.