DUXPLIMA Documentation

Economy

Where money wages go, what costs are taken in, the nine backends, the placeholder backend and bridges.

A wage and a cost do not share a road.

Wages

A money wage goes to the server's economy (Vault and the others), batched every economy.batch-seconds (5) and paid off the region thread, with the server account in front when it is on. A server with no economy still runs the whole plugin: the money wage is simply not paid, and the console says so once at load. Experience and points are the plugin's own.

Costs

A join fee, a leave cost, a contract price and every money requirement are taken through economy.currency, an order: the first backend this server runs answers, and the console says at load which one and what it passed over.

economy {
  currency = ["vault", "exp"]
}
NameIs
vault, vault-unlocked, playerpoints, ecobits, treasuryThose plugins; ecobits:gems names one currency
placeholder:<key>A placeholder backend below
expThe player's own experience points
levelsThe player's own experience levels
pointsJob points
A bridge nameA backend described below

The shipped order charges money with Vault and the player's experience on a server without it, which is a real balance but not the same price: read the console line and set your numbers. When nothing in the order runs, a cost is refused and the player is told. currency = [] makes every cost free. A job, contract or file that names a backend this server does not run fails that file at load.

treasury-wait-ms (250) is how long one Treasury call may take before nothing is taken.

The placeholder backend

For an economy with no API but a balance placeholder and a take command:

placeholder {
  tokens {
    balance   = "%tokens_balance%"
    take      = "tokens take {player} {amount}"
    thousands = ","
  }
}

A file then writes placeholder:tokens. The balance is read first, and a take the player cannot afford is refused.

Bridges

An economy plugin none of the names reach, described rather than compiled against:

KeyMeaning
pluginIts name in its own plugin file
classThe class the calls go to
accessservice, static, plugin or class
accessorFor static: the no argument methods to follow, getInstance.getApi
balance-method, take-methodThe methods that answer a balance and take an amount
argumentoffline-player, player-id or player-name
answerboolean, vault-response or nothing
currenciesone, by-name or by-object, with currency-class and currency-lookup
take-negatestrue when a take is a give of a negative number
callerWhat to call ourselves, for a plugin that asks

Related: economy.conf, Integrations