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.
An entry
currencies:
gems:
enabled: true
provider: coinsengine
key: "gems"
name: "Gems"
icon: AMETHYST_SHARD
decimals: false
min-pay: 1
max-pay: 100000The name under currencies (here gems) is the currency id. It is used in broadcast.thresholds and in the paid_<currency> and earned_<currency> placeholders.
| Key | What it does | Default |
|---|---|---|
enabled | Turn this currency on or off | true |
provider | Which plugin holds the balance, see below | none |
key | The currency inside that plugin, when the plugin has several | empty |
name | Name in menus and messages | the currency id |
icon | Icon on the currency menu. A material, or an ia:, nexo:, head: or base64: item as in menus | GOLD_INGOT |
decimals | Allow amounts like 12.50 | true |
min-pay | Smallest total a job may pay | 1 |
max-pay | Largest total a job may pay | 1000000 |
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
provider | Plugin | key |
|---|---|---|
vault | Vault with any economy plugin | not used |
playerpoints | PlayerPoints | not used, always whole numbers |
coinsengine | CoinsEngine or ExcellentEconomy | the currency id, required |
tokenmanager | TokenManager | not used, always whole numbers |
beasttokens | BeastTokens | not used |
gemseconomy | GemsEconomy | the currency name, empty for the default currency |
ultraeconomy | UltraEconomy | the currency name, required |
ecobits | EcoBits | the currency id, required |
custom | Anything, through PlaceholderAPI and console commands | not 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: falseSwap the placeholder and the commands for the ones your plugin really uses.
| Key | What it does | Default |
|---|---|---|
balance-placeholder | A PlaceholderAPI placeholder that shows the player's balance. Colour codes and other text around the number are ignored | none |
give-command | Console command that pays a worker | none |
take-command | Console command that takes the pay from the employer when posting | none |
refund-command | Console command that gives the pay back from a cancelled or expired job. Empty uses give-command | empty |
offline-payments | Run the give and refund commands right away for offline players. Only turn this on when your commands work for players who are offline | false |
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. Withtrue, 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.