Package dev.mintychochip.mint
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 accountname()- Display displayName (non-unique, informational only)createdAt()- Timestamp when account was createdamount()- Current balance (snapshot at retrieval time)
- Since:
- 1.0
-
Method Summary
-
Method Details
-
accountId
Gets the unique identifier for this account.- Returns:
- the account's UUID
-
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
Gets the timestamp when this account was created.- Returns:
- the creation timestamp
-
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
-