Interface Economy


public interface Economy
  • Method Details

    • hasWallet

      boolean hasWallet()
      Returns:
      if the player has a wallet
    • createWallet

      boolean createWallet()
      Returns:
      if a wallet has been made
    • getBalance

      long getBalance()
      Returns:
      balance of a player
    • hasEnoughBalance

      boolean hasEnoughBalance(long amountNeeded)
      Parameters:
      amountNeeded - is the minimum amount the player's balance must be to return true
      Returns:
      whether the account balance is >= the amountNeeded
    • payBalance

      boolean payBalance(Economy target, long amount)
      Parameters:
      target - is the account that is receiving the money
      amount - is the amount that is being sent
      Returns:
      true if the player hasEnoughBalance, otherwise false
    • addBalance

      void addBalance(long amount)
      Parameters:
      amount - is the amount that will be added to this account
    • removeBalance

      void removeBalance(long amount)
      Parameters:
      amount - is the amount that will removed from this account
    • setBalance

      void setBalance(long amount)
      Parameters:
      amount - is the amount that the balance will be set to
    • resetBalance

      void resetBalance()
      balance will be set to 0