Class CommandExecutionIdentity
java.lang.Object
dev.plex.api.command.CommandExecutionIdentity
Carries an attributed command name through a synchronous Plex command dispatch.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TRuns an action with a temporary command identity.static StringcurrentName(String fallback) Returns the current actor name.static @Nullable UUIDReturns the current actor UUID.
-
Method Details
-
call
public static <T> T call(@Nullable @Nullable UUID uniqueId, @Nullable @Nullable String name, Supplier<T> action) Runs an action with a temporary command identity.- Type Parameters:
T- result type- Parameters:
uniqueId- actor UUID, ornullname- actor name, ornullaction- action to run- Returns:
- action result
-
currentName
-
currentUniqueId
Returns the current actor UUID.- Returns:
- current actor UUID, or
nullwhen no UUID is set
-