Skip to content

Economy ​

Every player has a balance, a log of what happened to it, and a place in the leaderboard of the server.

The balance is per server ​

The balance is not a single number for the whole network: it is a number per server. A player who has $500 on survival has $500 on lobby too — and a different $500 on creative, because those are two different accounts.

The same holds for the leaderboard: /baltop shows the top of the server you are on.

TIP

The money of the lobby is not the money of the network. If you want one balance for the whole network, that is a change to the plugin — it is not a setting.

The commands ​

CommandPermissionWhat it does
/balanceappeltools.command.economy.balanceYour balance.
/baltop [page]appeltools.command.economy.baltopThe players with the highest balance on this server.
/pay <player> <amount>appeltools.command.economy.payPay a player.
/togglepay [true/false]appeltools.command.economy.togglepayAllow or refuse payments.
/transactionhistory [page]appeltools.command.economy.transactionhistoryThe log of your balance.
/transactionhistory <player> [page]appeltools.command.economy.transactionhistory.otherThe log of someone else's balance.
/economy add|remove|set <player> <amount>appeltools.command.economyChange the balance of a player.
/economy reset <player>appeltools.command.economySet the balance of a player to zero.

/balance also answers to /bal and /money, /baltop to /balancetop, /transactionhistory to /th, and /economy to /eco.

/balance ​

/balance shows your own balance and takes no argument. There is no command that shows the balance of another player; the staff see it in the statistics GUI.

/baltop ​

The leaderboard holds the 1000 players with the highest balance on the server, ten to a page. The first time you ask for it the plugin has to collect the list, which takes a moment — it says so, and then it shows the list. The list is cached for a minute, so the second player to ask does not have to wait.

The "total" at the top is the sum of the thousand players on the list, not of the whole server.

/pay ​

/pay Steve 25.50
  • The amount has to be more than zero, and it is rounded to two decimals.
  • You cannot pay a player who has switched their payments off — you are told so, and nothing happens.
  • You cannot pay more than you have.
  • You cannot pay yourself.
  • The target has to be online on the same server. The balances are per server, so a payment to somebody on another server is not possible.

Both of you get a message when the payment goes through.

/togglepay ​

/togglepay
/togglepay true
/togglepay false

Without an argument the switch flips. With true or false it is set to that value.

The switch is about the incoming payments: a player who has it off cannot be paid. It does not stop that player from paying somebody else.

/transactionhistory ​

The log of every change of the balance: the date, the amount, the type, the balance after the change and who did it.

  • Your own log needs appeltools.command.economy.transactionhistory.
  • The log of another player needs appeltools.command.economy.transactionhistory.other.

The log of another player is one of the few things that reaches across servers: it holds the changes of all the servers of the network, while the balance itself is per server.

/economy ​

/economy add Steve 100
/economy remove Steve 100
/economy set Steve 100
/economy reset Steve
  • add and remove change the balance by the amount. remove is refused when the player does not have that much.
  • set puts the balance at exactly the amount. An amount of zero is refused — use /economy reset for that.
  • reset puts the balance at zero and takes no amount.

Both sides are told what happened.


The configuration ​

yaml
economy:
  start-balance: 0.0
  transaction-history-days: 0
KeyDefaultWhat it does
economy.start-balance0.0The balance a player starts with.
economy.transaction-history-days0How long the log is kept, in days. Zero keeps it for ever.

The log is cleaned up every five minutes: the rows that are older than the number of days you set are deleted. A player who does not have a row yet starts with the starting balance.


Vault ​

The economy is exposed to other plugins through Vault, so a shop plugin can use it.

The name of the providerAppelEconomy
The currency$
The decimals2, so $1,234.50
A bankNot offered — the provider says it has no bank support.

The money is the same money as the one behind /balance: a shop that takes money through Vault takes it off the balance of the server the player is on.

Built with VitePress.