Class VaultEconomyManager

java.lang.Object
com.zetaplugins.essentialz.features.economy.manager.VaultEconomyManager
All Implemented Interfaces:
EconomyManager

public class VaultEconomyManager extends Object implements EconomyManager
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deposit(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.
    double
    getBalance(org.bukkit.OfflinePlayer player)
    Get the balance of a player.
    net.milkbowl.vault.economy.Economy
     
    getTopBalances(int topN)
    Get the top N players with the highest balances.
    void
     
    void
    setBalance(org.bukkit.OfflinePlayer player, double amount)
    Set a player's balance to a specific amount.
    boolean
    withdraw(org.bukkit.OfflinePlayer player, double amount)
    Withdraw an amount from a player's balance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VaultEconomyManager

      public VaultEconomyManager()
  • Method Details

    • init

      public void init()
    • getBalance

      public double getBalance(org.bukkit.OfflinePlayer player)
      Description copied from interface: EconomyManager
      Get the balance of a player.
      Specified by:
      getBalance in interface EconomyManager
      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: EconomyManager
      Deposit an amount to a player's balance.
      Specified by:
      deposit in interface EconomyManager
      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: EconomyManager
      Withdraw an amount from a player's balance.
      Specified by:
      withdraw in interface EconomyManager
      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: EconomyManager
      Set a player's balance to a specific amount.
      Specified by:
      setBalance in interface EconomyManager
      Parameters:
      player - The player to set the balance for.
      amount - The amount to set the balance to.
    • format

      public String format(double amount)
      Format a monetary amount according to the economy's formatting rules.
      Specified by:
      format in interface EconomyManager
      Parameters:
      amount - The amount to format.
      Returns:
      The formatted amount as a string.
    • getEconomy

      public net.milkbowl.vault.economy.Economy getEconomy()
    • getTopBalances

      public Map<UUID,Double> getTopBalances(int topN)
      Description copied from interface: EconomyManager
      Get the top N players with the highest balances.
      Specified by:
      getTopBalances in interface EconomyManager
      Parameters:
      topN - The number of top players to retrieve.
      Returns:
      A map of player UUIDs to their balances sorted in descending order.