Package dev.mintychochip.mint
Interface TransactionContext.Actor
- All Known Implementing Classes:
TransactionContext.PlayerActor,TransactionContext.PluginActor
- Enclosing interface:
TransactionContext
@AvailableSince("1.0")
public static interface TransactionContext.Actor
Represents the initiator of a transaction.
Actors are classified by type (PLAYER, PLUGIN, CUSTOM) and have a display displayName for identification in logs and audit trails.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumActor type classifications. -
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetName()Gets the display displayName of this actor.default TransactionContext.Actor.TypegetType()Gets the classification of this actor.Creates a player actor with the specified player identity.Creates a plugin actor with the specified plugin displayName.static TransactionContext.ActorCreates a simple custom actor with the specified displayName.
-
Method Details
-
simple
Creates a simple custom actor with the specified displayName.Use this for custom actor types that don't fit PLAYER or PLUGIN categories.
- Parameters:
name- the actor's display displayName- Returns:
- custom actor instance
-
player
Creates a player actor with the specified player identity.- Parameters:
playerId- the player's unique identifiername- the player's display displayName- Returns:
- player actor instance
-
plugin
Creates a plugin actor with the specified plugin displayName.- Parameters:
pluginName- the displayName of the plugin- Returns:
- plugin actor instance
-
getType
Gets the classification of this actor.- Returns:
- actor type
-
getName
Gets the display displayName of this actor.- Returns:
- actor displayName
-