Package de.kentoj.scrowlib.economy
Interface EconomyService
- All Known Implementing Classes:
InMemoryEconomyService,PostgresEconomyService
public interface EconomyService
-
Method Summary
Modifier and TypeMethodDescriptionvoiddepositCoins(UUID playerId, int amount) adds coins to the players accountintvoidbooleantryWithdrawCoins(UUID playerId, int amount) tries to take coins from the player's account or returns false on insufficient funds
-
Method Details
-
getCoins
- Throws:
IllegalArgumentException- if amount is less than 0
-
depositCoins
adds coins to the players account- Parameters:
playerId- uuid of player- Throws:
IllegalArgumentException- if amount is less than 0
-
tryWithdrawCoins
tries to take coins from the player's account or returns false on insufficient funds- Parameters:
playerId- uuid of player- Returns:
- true on success, false on insufficient funds
- Throws:
IllegalArgumentException- if amount is less than 0
-
setCoins
- Parameters:
playerId- uuid of player- Throws:
IllegalArgumentException- if amount is less than 0
-