Interface EconomyProvider


public interface EconomyProvider
Represents a specific economy backend (e.g. Vault, PlayerPoints, custom, etc.).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    deposit(@NotNull org.bukkit.OfflinePlayer player, double amount)
    Deposits an amount into a player's balance.
    double
    getBalance(@NotNull org.bukkit.OfflinePlayer player)
    Gets the balance of a player.
    @NotNull String
    Gets the unique name of this provider.
    boolean
    Checks if this economy provider is available and ready for transactions.
    boolean
    setBalance(@NotNull org.bukkit.OfflinePlayer player, double amount)
    Sets a player's balance to a specific amount.
    boolean
    withdraw(@NotNull org.bukkit.OfflinePlayer player, double amount)
    Withdraws an amount from a player's balance.
  • Method Details

    • getName

      @NotNull @NotNull String getName()
      Gets the unique name of this provider.
      Returns:
      the provider name
    • isAvailable

      boolean isAvailable()
      Checks if this economy provider is available and ready for transactions.
      Returns:
      true if available, false otherwise
    • getBalance

      double getBalance(@NotNull @NotNull org.bukkit.OfflinePlayer player)
      Gets the balance of a player.
      Parameters:
      player - the player
      Returns:
      the balance, or 0.0 if not available or player has no account
    • withdraw

      boolean withdraw(@NotNull @NotNull org.bukkit.OfflinePlayer player, double amount)
      Withdraws an amount from a player's balance.
      Parameters:
      player - the player
      amount - the amount to withdraw
      Returns:
      true if successful, false otherwise
    • deposit

      boolean deposit(@NotNull @NotNull org.bukkit.OfflinePlayer player, double amount)
      Deposits an amount into a player's balance.
      Parameters:
      player - the player
      amount - the amount to deposit
      Returns:
      true if successful, false otherwise
    • setBalance

      boolean setBalance(@NotNull @NotNull org.bukkit.OfflinePlayer player, double amount)
      Sets a player's balance to a specific amount.
      Parameters:
      player - the player
      amount - the new balance amount
      Returns:
      true if successful, false otherwise