HireHall

Currencies

The currency plugins HireHall can pay with, and every key in currencies.yml.

Jobs can pay in any currency listed in currencies.yml. Each entry is hooked into a currency plugin, and only loads when that plugin is installed and enabled. Players pick the currency in the posting menu.

Nine cards, one per provider, vault, playerpoints, coinsengine, tokenmanager, beasttokens, gemseconomy, ultraeconomy, ecobits and custom, each with what the key setting needs

An entry

currencies:
  gems:
    enabled: true
    provider: coinsengine
    key: "gems"
    name: "Gems"
    icon: AMETHYST_SHARD
    decimals: false
    min-pay: 1
    max-pay: 100000

The name under currencies (here gems) is the currency id. It is used in broadcast.thresholds and in the paid_<currency> and earned_<currency> placeholders.

KeyWhat it doesDefault
enabledTurn this currency on or offtrue
providerWhich plugin holds the balance, see belownone
keyThe currency inside that plugin, when the plugin has severalempty
nameName in menus and messagesthe currency id
iconIcon on the currency menu. A material, or an ia:, nexo:, head: or base64: item as in menusGOLD_INGOT
decimalsAllow amounts like 12.50true
min-paySmallest total a job may pay1
max-payLargest total a job may pay1000000

min-pay and max-pay always apply to the job's total pay. When an employer prices per unit, the total is the amount times the unit price, so the smallest and largest unit price the menu allows change with the amount. See Posting a job.

Providers

providerPluginkey
vaultVault with any economy pluginnot used
playerpointsPlayerPointsnot used, always whole numbers
coinsengineCoinsEngine or ExcellentEconomythe currency id, required
tokenmanagerTokenManagernot used, always whole numbers
beasttokensBeastTokensnot used
gemseconomyGemsEconomythe currency name, empty for the default currency
ultraeconomyUltraEconomythe currency name, required
ecobitsEcoBitsthe currency id, required
customAnything, through PlaceholderAPI and console commandsnot used

When a currency cannot be hooked (a wrong key, an unknown provider, the plugin not ready) the console says why and the currency is skipped. If no currency loads at all, jobs can only pay with items.

Decimals

decimals: true is only a wish. If the plugin itself only handles whole numbers (PlayerPoints, TokenManager, a Vault economy without decimals, or a GemsEconomy, UltraEconomy or EcoBits currency set to whole numbers), HireHall uses whole numbers. Amounts are always rounded down, never up. With decimals the smallest possible min-pay is 0.01, without them 1.

Custom currency

The custom provider works with any plugin that has a balance placeholder and console commands to give and take, for example a shop or store points plugin. It needs PlaceholderAPI. The bundled custom-money entry is off by default, copy the block to add as many command based currencies as you like.

Example: shop points

Say your store plugin keeps "PB" points, shows the balance with %shop_points% and has points give and points take commands:

  pb:
    enabled: true
    provider: custom
    key: ""
    name: "PB"
    icon: "head:MHF_Chest"
    decimals: false
    min-pay: 1
    max-pay: 50000
    balance-placeholder: "%shop_points%"
    give-command: "points give %player% %amount%"
    take-command: "points take %player% %amount%"
    refund-command: ""
    offline-payments: false

Swap the placeholder and the commands for the ones your plugin really uses.

KeyWhat it doesDefault
balance-placeholderA PlaceholderAPI placeholder that shows the player's balance. Colour codes and other text around the number are ignorednone
give-commandConsole command that pays a workernone
take-commandConsole command that takes the pay from the employer when postingnone
refund-commandConsole command that gives the pay back from a cancelled or expired job. Empty uses give-commandempty
offline-paymentsRun the give and refund commands right away for offline players. Only turn this on when your commands work for players who are offlinefalse

In all commands %player% is the player name, %uuid% the player's UUID and %amount% the amount. A leading / is fine. balance-placeholder, give-command and take-command must be set or the currency is skipped.

  • Before posting, HireHall reads the balance from the placeholder. If it is lower than the pay, posting is refused and the take command is never run.
  • With offline-payments: false, a payment or refund for an offline player waits in their claims and the command runs when they next join. With true, it runs straight away.

HireHall cannot see whether a custom take command really took the money, it only checks the balance placeholder before running it. Test your commands with a small job first.

Changes apply after /hirehall admin reload. A currency that is removed while claims in it are still waiting keeps those claims, they are paid once the currency is back.

On this page