Klasse PlayerFinanceService

java.lang.Object
de.delinkedde.areashopreborn.application.PlayerFinanceService

public final class PlayerFinanceService extends Object
Exposes asynchronous player transaction history and journal-derived income totals.
  • Konstruktordetails

    • PlayerFinanceService

      public PlayerFinanceService(Database database, PlayerFinanceRepository finances)
      Creates the player finance service.
      Parameter:
      database - asynchronous database executor
      finances - finance projection repository
  • Methodendetails

    • transactions

      public CompletableFuture<List<PlayerTransactionEntry>> transactions(UUID playerId, int limit)
      Lists the newest completed finance entries of a player.
      Parameter:
      playerId - player identifier
      limit - maximum entries
      Gibt zurück:
      future containing newest entries first
    • income

      public CompletableFuture<BigDecimal> income(UUID playerId, Duration lookback)
      Sums income received during a lookback duration.
      Parameter:
      playerId - recipient identifier
      lookback - duration measured backwards from now
      Gibt zurück:
      future containing journal-derived income