Interface EconomyService

All Known Implementing Classes:
InMemoryEconomyService, PostgresEconomyService

public interface EconomyService
  • Method Details

    • getCoins

      int getCoins(UUID playerId)
      Throws:
      IllegalArgumentException - if amount is less than 0
    • depositCoins

      void depositCoins(UUID playerId, int amount)
      Parameters:
      playerId - uuid of player
      Throws:
      IllegalArgumentException - if amount is less than 0
    • tryWithdrawCoins

      boolean tryWithdrawCoins(UUID playerId, int amount)
      Parameters:
      playerId - uuid of player
      Returns:
      true on success, false on insufficient funds
      Throws:
      IllegalArgumentException - if amount is less than 0
    • setCoins

      void setCoins(UUID playerId, int amount)
      Parameters:
      playerId - uuid of player
      Throws:
      IllegalArgumentException - if amount is less than 0