DUXPLIMA Documentation

Economies

Every currency name a cost, a requirement or a reward can use, placeholder currencies, and bridges to any economy.

A crate's cost, a requirement, a reward's money and the reroll price all name a currency the same way.

Names

NamePays in
vaultThe server economy, through Vault
vault-unlockedThe modern Vault, registered beside the old one
playerpointsPlayerPoints
ecobits:<currency>One EcoBits currency; EcoBits always needs one named
treasuryTreasury's primary currency
treasury:<currency>One Treasury currency by name
placeholder:<name>A placeholder currency
<bridge>A bridge
expThe player's experience points; needs no plugin
levelsThe player's experience levels; needs no plugin

vault, vault-unlocked and playerpoints hold one balance each, so a currency after them is refused rather than guessed at.

Where they are written

PlaceForm
A crate's cost"[take-money] vault 500"
A crate's requirements"money vault >= 500", "money ecobits:gems >= 3"
A reward's money"vault 500", "exp 500"
rerolls.price.currency"vault"

A crate that names a currency this server does not run is not loaded, and the console names the file and the key.

Treasury

economy.treasury-wait-ms (250) is how long one Treasury call may take before the plugin gives up and takes nothing. It runs on the player's thread, so a large number stalls a tick. Raise it only for an economy on a slow database.

Placeholder currencies

Many economy plugins have no API but publish a balance placeholder and a take command. That pair is one currency:

economy {
  placeholder {
    tokens {
      balance   = "%tokens_balance%"
      take      = "tokens take {player} {amount}"
      thousands = ","
    }
  }
}
KeyMeaning
balanceThe placeholder that answers the balance
takeThe console line that takes it. {player}, {uuid} and {amount} are filled in
thousandsThe group separator that plugin writes, removed before the number is read

A crate writes [take-money] placeholder:tokens 40. A command cannot report a failure, so the balance is read first and a take the player cannot afford is refused. Needs PlaceholderAPI.

Bridges

An economy none of the names reach is described in economy.bridges, not compiled against. The key is the name a crate writes. None of that plugin's code is touched unless it is installed.

economy {
  bridges {
    mybank {
      plugin         = "MyBank"
      class          = "com.example.mybank.api.BankAPI"
      access         = "static"
      accessor       = "getInstance.getApi"
      balance-method = "getBalance"
      take-method    = "withdraw"
      argument       = "player-id"
      answer         = "boolean"
      currencies     = "one"
    }
  }
}
KeyMeaning
pluginThe name in that plugin's own plugin file
classThe class the calls go to
accessservice, static, plugin or class
accessorFor static: the no-argument methods to follow, such as getInstance.getAPI
balance-methodThe method that answers a balance
take-methodThe method that takes an amount
argumentoffline-player, player-id or player-name
answerboolean, vault-response or nothing
currenciesone, by-name or by-object
currency-class, currency-lookupFor by-object: the class that hands out currency objects and its static method that takes a name
take-negatestrue when the plugin has no take and a take is a give of a negative amount
callerWhat to call ourselves, for a plugin that asks who is moving the money

Related: economy.conf, Crates