Class WCurrency.BankProvider

java.lang.Object
com.olziedev.playerwarps.api.expansion.WCurrency.BankProvider
Enclosing class:
WCurrency

public abstract static class WCurrency.BankProvider extends Object
Represents a bank provider that can be used to withdraw money from a bank account.
  • Constructor Details

    • BankProvider

      public BankProvider()
  • Method Details

    • hasBalance

      public boolean hasBalance(WPlayer wPlayer, double amount)
      Retrieve if the player has the balance specified in this provider.
      Parameters:
      wPlayer - The player to that checks the balance for.
      amount - The amount to check for.
      Returns:
      If the player has the amount in this provider.
    • isEnabled

      public abstract boolean isEnabled()
      Returns:
      If the provider is enabled in the configuration file and is loaded onto the server.
    • getBalance

      public abstract double getBalance(WPlayer wPlayer)
      Retrieve the balance from a player in this provider.
      Parameters:
      wPlayer - The player to get the balance from.
      Returns:
      The balance from the player in this provider.
    • withdraw

      public abstract void withdraw(WPlayer wPlayer, double amount, Consumer<Boolean> response)
      Withdraw the amount from the players balance in this provider.
      Parameters:
      wPlayer - The player to withdraw the currency from.
      amount - The amount to take from this currency.
      response - The response of the withdrawal.