Content generated with AI — it may contain mistakes.

ExyliaEconomy/Getting startedUpdated in v1.4.0

Installation

Downloading the plugin, the ExyliaLib it needs, the database, the files the first start writes, and how updates arrive.

Page 2 of 255 min read

ExyliaEconomy is free: download the jar, drop it in plugins/ next to ExyliaLib, and have a working economy after one restart.

Downloading#

ExyliaEconomy is free. Every release is published on Modrinth as ExyliaEconomy-<version>.jar.

Before you start#

PluginWhat for
ExyliaLibRequired. Configuration, menus, database, Redis, placeholders, the editors and the economy facade. 1.597.0 or newer.
ServerPaper or Folia 1.21.4 or newer. Java 21.
VaultOptional. Without it nothing is published as the Vault economy, and plugins that only speak Vault see no money.
PlaceholderAPIOptional. Exposes the balances and leaderboards to other plugins.
ExyliaAnalyticsOptional. Is handed every stored currency's money supply.
ExyliaLib is listed as soft, and is not downloaded for you

plugin.yml names ExyliaLib under softdepend on purpose, so the plugin can still start without it and say what is wrong. Without ExyliaLib, ExyliaEconomy stays off and tells the console where to get it (Modrinth or the library's GitHub releases): put the jar in plugins/ and restart. When an ExyliaLib jar is already in plugins/ but failed to load, the console asks you to fix the library's own errors first.

ExyliaEconomy does not need packetevents itself. ExyliaLib does: install it next to the library as the library's installation page explains.

Installing#

Drop in the jar

Copy ExyliaEconomy.jar into plugins/, with Vault if you want plugins that use Vault to see the currencies.

Start the server

Without ExyliaLib the plugin stays off and the console says where to get it; install it and restart.

Check the console

The plugin enables without a banner. Run /economyadmin: the currency list opening means the currencies are read. With Debug on in Economy settings the console also prints a line such as Economy: 2 stored, 1 item and 1 experience currencies., then which currency serves Vault. Money works a moment after the server finishes starting.

Open the editor

With exyliaeconomy.admin, run /economyadmin to see the currencies the server starts with. See First steps.

Coming from ExyliaSurvivalCore

The automatic import of the survival core's economy was removed in 1.2.1. A server that still runs the module must first move over with a release from before it. See Migration.

Generated files#

All of them live in plugins/ExyliaEconomy/.

FileContents
lang/<code>/messages.ymlEvery line the plugin sends, the banknote's look, and the words of the currency editor.
lang/<code>/menus/user/The players' screens: wallet.yml, top.yml, history.yml. Written when missing, never overwritten.
lang/<code>/menus/admin/The editor's screens: the currency list, a currency and its pages, the economy settings and the admin ledger.
screens/economy.html, screens/theme.cssThe wallet, leaderboard and history as one screen.
database.ymlDatabase engine and Redis, written by ExyliaLib. H2 by default.
currencies.yml.importedThe currency file the first start imported into the database, set aside. Never read again.
exports/Ledger exports written by /economyadmin export.
config.yml.migratedAn old config.yml imported into the database, set aside. Only on a server updated from an older version.

<code> is the language the plugin runs in: en, es, pt, fr, ru or tr, or ExyliaLib's own language while Economy settings says default. See Configuration.

menus/admin/ is rewritten

The three editor screens are replaced from the jar every time the plugin starts and every time its menus are reloaded — /economyadmin reload, and a reload of ExyliaLib itself. Their header says "regenerated on every startup"; it happens on reload too. Nothing an owner is meant to edit lives there.

The currencies are not in a file

Currencies and the economy-wide settings live in the database, in exylia_currencies and exylia_economy_settings, and are edited with /economyadmin. The first start imports currencies.yml — yours, or the shipped defaults — and renames it. A currencies.yml found on a later start is reported in the console and ignored.

Database#

By default the plugin uses H2: a file inside the plugin folder, with no server, no installation and no maintenance. It is perfectly fine for a single server.

To share balances across servers, every server points at the same database:

plugins/ExyliaEconomy/database.yml
yaml
database:
  type: mysql
  settings:
    pool-size: 0
  mysql:
    host: 127.0.0.1
    port: 3306
    database: minecraft
    username: root
    password: ""
  redis:
    enabled: true
    host: 127.0.0.1
    server-id: survival-1

Supported engines: h2, mysql, mariadb, postgresql and mongodb. Only the block matching type is read. The file is ExyliaLib's; its full reference is in the library's database page.

Give every server its own server-id

Who holds a balance is decided by server-id, which is server-1 unless you change it. Two servers sharing a database with the same id both believe they hold the player and write over each other's balances. The console warns once when it sees the default id on a shared database. See Network.

Nothing waits on the database while the plugin enables. The currencies are read on the first tick; a player's balances are claimed when they join, and every write is asynchronous.

Updating#

ExyliaLib keeps ExyliaEconomy up to date. The plugin names its GitHub repository in plugin.yml (exylia-updates: Exylia-Plugins/ExyliaEconomy) and the oldest library it runs on (exylia-lib: 1.597.0); ExyliaLib checks for a newer release at startup and on a timer, downloads it, checks it, and stages it for the next restart.

  • Only minor and patch releases are installed on their own. A new major version is announced and left to you.
  • A release that needs a newer ExyliaLib than the one that will be running is held back until the library catches up.
  • /exylialib plugins checks right now. plugin-updates in plugins/ExyliaLib/config.yml turns it off (enabled: false), allows majors, or skips this plugin by name.

To update by hand, replace the jar and restart. messages.yml and the players' menus keep your edits; menus/admin/ is refreshed from the jar; currencies, balances and the ledger live in the database and are untouched.

Something missing on this page? Tell us on Discord