Interface Account


@AvailableSince("1.0") public interface Account
Represents a read-only view of an economy account.

Account instances are immutable snapshots taken at retrieval time. To modify account balances, use EconomyService.beginTransaction(UUID) to create a transaction.

Properties

  • accountId() - Unique identifier for this account
  • name() - Display displayName (non-unique, informational only)
  • createdAt() - Timestamp when account was created
  • amount() - Current balance (snapshot at retrieval time)
Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the unique identifier for this account.
    Gets the current balance of this account.
    Gets the timestamp when this account was created.
    Gets the display displayName of this account.
  • Method Details

    • accountId

      @AvailableSince("1.0") UUID accountId()
      Gets the unique identifier for this account.
      Returns:
      the account's UUID
    • name

      @AvailableSince("1.0") String name()
      Gets the display displayName of this account.

      Names are non-unique and serve informational purposes only. Multiple accounts may share the same displayName.

      Returns:
      the account displayName
    • createdAt

      @AvailableSince("1.0") Timestamp createdAt()
      Gets the timestamp when this account was created.
      Returns:
      the creation timestamp
    • amount

      @AvailableSince("1.0") BigDecimal amount()
      Gets the current balance of this account.

      This is a snapshot at the time of retrieval and is not transactionally consistent with ongoing operations. For atomic balance operations, use transactions.

      Returns:
      the account balance