Interface EconomyService


public interface EconomyService
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<@NotNull Void>
    depositCoins(UUID playerId, int amount)
     
    reactor.core.publisher.Mono<@NotNull Integer>
    getCoins(UUID playerId)
     
    reactor.core.publisher.Mono<@NotNull Void>
    setCoins(UUID playerId, int amount)
     
    reactor.core.publisher.Mono<@NotNull Boolean>
    tryWithdrawCoins(UUID playerId, int amount)
     
  • Method Details

    • getCoins

      reactor.core.publisher.Mono<@NotNull Integer> getCoins(UUID playerId)
      Throws:
      IllegalArgumentException - if amount is less than 0
    • depositCoins

      reactor.core.publisher.Mono<@NotNull Void> depositCoins(UUID playerId, int amount)
      Parameters:
      playerId - uuid of player
      Throws:
      IllegalArgumentException - if amount is less than 0
    • tryWithdrawCoins

      reactor.core.publisher.Mono<@NotNull 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

      reactor.core.publisher.Mono<@NotNull Void> setCoins(UUID playerId, int amount)
      Parameters:
      playerId - uuid of player
      Throws:
      IllegalArgumentException - if amount is less than 0