Skip to content

Custom placeholder currencies, and how the economy engine values one currency against another. Written to plugins/ProtonAuctions/currencies.yml. For how currencies work in game, see Currencies.

Top level

KeyDefaultWhat it does
enabledtrueTurn on the custom placeholder currencies defined below. Needs PlaceholderAPI.
autopilotEnabledfalseScan the other plugins on your server at startup for economy APIs and register what it finds. Discovered currencies appear as autopilot:<pluginname>. See Autopilot.

exchangeRates

How the engine values a trade made in one currency against another. Each entry maps a currency id to how many of the server's default currency one unit of it is worth. The default currency is 1.0 and never needs listing. A currency with no rate here and none learned yet is left out of prices until it has one, and /ahadmin currencies flags it. Leave the whole map empty to let the engine learn rates from cross-currency trades where it can. See Multi-Currency, which also lists the currency ids.

Run /ahadmin currencies in game to list every live currency id, including autopilot-detected ones.

exchangeRates:  tokenmanager: 5.0            # 1 token is worth 5 of the default currency  gemseconomy:gem: 0.5         # 1 gem is worth half the default currency

aliases

Extra names the engine treats as the same currency, written as alias: currencyId. Built in already: money, dollars, coins and balance map to vault, points maps to playerpoints, and tokens maps to tokenmanager. Add your own when a plugin reports one currency under several names.

aliases:  gold: vault  gems: gemseconomy:gem

currencies

Custom currencies driven by PlaceholderAPI and console commands. Each one is a block under currencies:, keyed by an id you choose, with these keys:

KeyWhat it does
displayNameThe name shown in menus. MiniMessage formatted.
balancePlaceholderA PlaceholderAPI placeholder that returns the player's balance.
withdrawCommandConsole command to take the currency. {player} and {amount} are filled in.
depositCommandConsole command to give the currency. {player} and {amount} are filled in.
isDoubleWhether the currency allows decimals. Default false.
formatPrefixText shown before the amount.
formatSuffixText shown after the amount.

The file ships with an example_tokens block you can copy. See Custom Currencies.

currencies:  tokenenchant:    displayName: '<gold>Tokens</gold>'    balancePlaceholder: '%tokenenchant_tokens%'    withdrawCommand: 'te take {player} {amount}'    depositCommand: 'te give {player} {amount}'    isDouble: false    formatPrefix: ''    formatSuffix: ' Tokens'

Use these key names exactly as shown, in camelCase, for example displayName rather than display-name.

Last updated