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.

  • Method Details

    • simple

      @AvailableSince("1.0") static TransactionContext.Actor simple(String name)
      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

      @AvailableSince("1.0") static TransactionContext.PlayerActor player(UUID playerId, String name)
      Creates a player actor with the specified player identity.
      Parameters:
      playerId - the player's unique identifier
      name - the player's display displayName
      Returns:
      player actor instance
    • plugin

      @AvailableSince("1.0") static TransactionContext.PluginActor plugin(String pluginName)
      Creates a plugin actor with the specified plugin displayName.
      Parameters:
      pluginName - the displayName of the plugin
      Returns:
      plugin actor instance
    • getType

      @AvailableSince("1.0") default TransactionContext.Actor.Type getType()
      Gets the classification of this actor.
      Returns:
      actor type
    • getName

      @AvailableSince("1.0") default String getName()
      Gets the display displayName of this actor.
      Returns:
      actor displayName