Interface EconomyManager

All Known Implementing Classes:
BuiltinEconomyManager, UnusedEconomyManager, VaultEconomyManager

public interface EconomyManager
Interface for managing player economy.
  • 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.
    getTopBalances(int topN)
    Get the top N players with the highest balances.
    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.
  • Method Details

    • getBalance

      double getBalance(org.bukkit.OfflinePlayer player)
      Get the balance of a player.
      Parameters:
      player - The player to get the balance of.
      Returns:
      The balance of the player.
    • deposit

      void deposit(org.bukkit.OfflinePlayer player, double amount)
      Deposit an amount to a player's balance.
      Parameters:
      player - The player to deposit to.
      amount - The amount to deposit.
    • withdraw

      boolean withdraw(org.bukkit.OfflinePlayer player, double amount)
      Withdraw an amount from a player's balance.
      Parameters:
      player - The player to withdraw from.
      amount - The amount to withdraw.
      Returns:
      True if the withdrawal was successful, false otherwise.
    • setBalance

      void setBalance(org.bukkit.OfflinePlayer player, double amount)
      Set a player's balance to a specific amount.
      Parameters:
      player - The player to set the balance for.
      amount - The amount to set the balance to.
    • format

      String format(double amount)
      Format a monetary amount according to the economy's formatting rules.
      Parameters:
      amount - The amount to format.
      Returns:
      The formatted amount as a string.
    • getTopBalances

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