Interface Economy
- All Superinterfaces:
Manager, ShutDownable, Startable, Toggleable
- All Known Implementing Classes:
DisabledEconomy, VaultEconomy
Economy
This interface represents economy manager that has operations with server's economy, like taking, giving and getting player's money.-
Method Summary
Modifier and TypeMethodDescriptionbooleandepositMoney(@NotNull org.bukkit.OfflinePlayer offlinePlayer, @NotNull Number money) Deposits money to player for some reason, examples: gets world liked, some player bought in his world.@NotNull NumbergetBalance(org.bukkit.OfflinePlayer offlinePlayer) Returns an amount of money that player has currently on his balance.booleanwithdrawMoney(@NotNull org.bukkit.OfflinePlayer offlinePlayer, @NotNull Number money) Takes money from player balance, examples: buys something in world.Methods inherited from interface ShutDownable
shutdownMethods inherited from interface Toggleable
isWorkingModifier and TypeMethodDescriptionbooleanChecks whether manager was started successfully and it currently works.
-
Method Details
-
depositMoney
boolean depositMoney(@NotNull @NotNull org.bukkit.OfflinePlayer offlinePlayer, @NotNull @NotNull Number money) Deposits money to player for some reason, examples: gets world liked, some player bought in his world.- Parameters:
offlinePlayer- Player to give money.money- Amount of money to give.- Returns:
- true - if successfully taken, false - failed.
-
withdrawMoney
boolean withdrawMoney(@NotNull @NotNull org.bukkit.OfflinePlayer offlinePlayer, @NotNull @NotNull Number money) Takes money from player balance, examples: buys something in world.- Parameters:
offlinePlayer- Player to take his money.money- Amount of money to take.- Returns:
- true - if successfully taken, false - failed.
-
getBalance
Returns an amount of money that player has currently on his balance.- Parameters:
offlinePlayer- Player to check balance.- Returns:
- Amount of money on player's balance.
-