-
Notifications
You must be signed in to change notification settings - Fork 5
Economy
ServerTools can be your server's whole economy, so you don't need a separate economy plugin.
Needs: Vault. Optional: PlaceholderAPI for balance placeholders.
ServerTools plugs into Vault, so any Vault-aware plugin (shops and the like) uses these balances. Balances are saved to a local database file inside the plugin folder, so they survive restarts and stay exact with no rounding weirdness.
- Install Vault.
- Set
Economy.Enabled: true.
That's it. If Vault isn't installed the economy just won't turn on.
| Command | What it does | Permission |
|---|---|---|
/pay <player> <amount> |
Send money to another player | servertools.pay |
/eco <give|take|set> <player> <amount> |
Admin balance management | servertools.eco.admin |
/balance [player] |
Check your balance or someone else's | (none by default) |
/baltop |
Top balances leaderboard | (none by default) |
Here's the Economy: block from config.yml. Edit the starting balance, currency name/symbol, and the command toggles to taste. The Messages and BalTop sections are fully customizable too. The message list below is just a short sample, the real config has more keys but they all work the same way (&-color codes plus %player% %amount% %balance% %input% placeholders, and %rank% in BalTop.Line).
Economy:
Enabled: true
StartingBalance: 0.0
CurrencySymbol: '$'
CurrencyNameSingular: 'Dollar'
CurrencyNamePlural: 'Dollars'
Pay:
# /pay <player> <amount>
Enabled: true
Permission: servertools.pay
Admin:
# /eco <give|take|set> <player> <amount> (admin)
Enabled: true
Permission: servertools.eco.admin
Balance:
# /balance [player] and /baltop
Enabled: true
Messages:
NotEnabled: '&c[!] The economy is not enabled.'
InvalidAmount: '&c[!] &f%input% &cis not a valid amount.'
PaySent: '&aYou paid &f%player% %amount%&a. New balance: &f%balance%'
PayReceived: '&aYou received %amount% &afrom &f%player%&a. New balance: &f%balance%'
PayInsufficient: "&c[!] You can't afford that. Balance: &f%balance%"
EcoSet: "&aSet &f%player%&a's balance. Now: &f%balance%"
# ...more keys, see config.yml
BalTop:
Limit: 10
Header: '&e&lTop Balances'
Line: '&e%rank%. &f%player% &7- &a%balance%'
Empty: '&7No accounts yet.'BalTop.Limit sets how many rows /baltop shows (default 10).
There's also a max balance cap so no single account can ever overflow. A payment or admin grant that'd push someone over it just gets refused, nothing wraps around or breaks.
If you use PlaceholderAPI, %vault_eco_balance_formatted% shows a player's balance formatted with your currency symbol.
Getting started
Features
- Core Features
- Chat
- World and Mob Protections
- Moderation
- Events, Cooldowns and Tasks
- Utilities and Misc
- Hopper Optimization