Package dev.mintychochip.mint
Interface TransactionContext
@AvailableSince("1.0")
public sealed interface TransactionContext
Sealed interface providing audit metadata about a transaction's initiator.
Tracks who initiated a transaction and optionally why, enabling audit trails and transaction attribution.
- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents the initiator of a transaction.static final recordActor implementation for player-initiated transactions.static final recordActor implementation for plugin-initiated transactions. -
Method Summary
Modifier and TypeMethodDescription@NotNull TransactionContext.Actoractor()Returns the entity that initiated this transaction.static TransactionContextcreate(TransactionContext.Actor actor, @Nullable String reason) reason()Returns the optional human-readable justification for this transaction.
-
Method Details
-
create
-
actor
Returns the entity that initiated this transaction.- Returns:
- the transaction actor
-
reason
Returns the optional human-readable justification for this transaction.- Returns:
- optional reason string
-