Class UnusedEconomyManager
java.lang.Object
com.zetaplugins.essentialz.features.economy.manager.UnusedEconomyManager
- All Implemented Interfaces:
EconomyManager
-
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.getTopBalances(int topN) Get the top N players with the highest balances.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
-
UnusedEconomyManager
public UnusedEconomyManager()
-
-
Method Details
-
getBalance
public double getBalance(org.bukkit.OfflinePlayer player) Get the balance of a player.- Specified by:
getBalancein interfaceEconomyManager- 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) Deposit an amount to a player's balance.- Specified by:
depositin interfaceEconomyManager- Parameters:
player- The player to deposit to.amount- The amount to deposit.
-
withdraw
public boolean withdraw(org.bukkit.OfflinePlayer player, double amount) Withdraw an amount from a player's balance.- Specified by:
withdrawin interfaceEconomyManager- 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) Set a player's balance to a specific amount.- Specified by:
setBalancein interfaceEconomyManager- 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 interfaceEconomyManager- Parameters:
amount- The amount to format.- Returns:
- The formatted amount as a string.
-
getTopBalances
Description copied from interface:EconomyManagerGet the top N players with the highest balances.- Specified by:
getTopBalancesin interfaceEconomyManager- Parameters:
topN- The number of top players to retrieve.- Returns:
- A map of player UUIDs to their balances sorted in descending order.
-