Class VaultEconomyService
java.lang.Object
com.zetaplugins.essentialz.features.economy.service.VaultEconomyService
- All Implemented Interfaces:
EconomyService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeposit(org.bukkit.OfflinePlayer player, double amount) Deposit an amount to a player's balance.format(double amount) Format a monetary amount according to the economy's formatting rules.doublegetBalance(org.bukkit.OfflinePlayer player) Get the balance of a player.net.milkbowl.vault.economy.EconomygetTopBalances(int topN) Get the top N players with the highest balances.voidinit()voidsetBalance(org.bukkit.OfflinePlayer player, double amount) Set a player's balance to a specific amount.booleanwithdraw(org.bukkit.OfflinePlayer player, double amount) Withdraw an amount from a player's balance.
-
Constructor Details
-
VaultEconomyService
public VaultEconomyService()
-
-
Method Details
-
init
public void init() -
getBalance
public double getBalance(org.bukkit.OfflinePlayer player) Description copied from interface:EconomyServiceGet the balance of a player.- Specified by:
getBalancein interfaceEconomyService- Parameters:
player- The player to get the balance of.- Returns:
- The balance of the player.
-
deposit
public void deposit(org.bukkit.OfflinePlayer player, double amount) Description copied from interface:EconomyServiceDeposit an amount to a player's balance.- Specified by:
depositin interfaceEconomyService- Parameters:
player- The player to deposit to.amount- The amount to deposit.
-
withdraw
public boolean withdraw(org.bukkit.OfflinePlayer player, double amount) Description copied from interface:EconomyServiceWithdraw an amount from a player's balance.- Specified by:
withdrawin interfaceEconomyService- Parameters:
player- The player to withdraw from.amount- The amount to withdraw.- Returns:
- True if the withdrawal was successful, false otherwise.
-
setBalance
public void setBalance(org.bukkit.OfflinePlayer player, double amount) Description copied from interface:EconomyServiceSet a player's balance to a specific amount.- Specified by:
setBalancein interfaceEconomyService- Parameters:
player- The player to set the balance for.amount- The amount to set the balance to.
-
format
Format a monetary amount according to the economy's formatting rules.- Specified by:
formatin interfaceEconomyService- Parameters:
amount- The amount to format.- Returns:
- The formatted amount as a string.
-
getEconomy
public net.milkbowl.vault.economy.Economy getEconomy() -
getTopBalances
Description copied from interface:EconomyServiceGet the top N players with the highest balances.- Specified by:
getTopBalancesin interfaceEconomyService- Parameters:
topN- The number of top players to retrieve.- Returns:
- A map of player UUIDs to their balances sorted in descending order.
-