@ApiStatus.Internal public final class ThreadExecutorCooldownCondition extends java.lang.Object implements CommandCondition<CommandActor>, PostCommandExecutedHook<CommandActor>, ContextParameter.Factory<CommandActor>
| Constructor and Description |
|---|
ThreadExecutorCooldownCondition() |
| Modifier and Type | Method and Description |
|---|---|
<T> @Nullable ContextParameter<CommandActor,T> |
create(@NotNull java.lang.reflect.Type parameterType,
@NotNull AnnotationList annotations,
@NotNull Lamp<CommandActor> lamp)
Dynamically creates a
ContextParameter |
void |
onPostExecuted(@NotNull ExecutableCommand<CommandActor> command,
@NotNull ExecutionContext<CommandActor> context)
Invokes the hook for a command whose action has been successfully executed
|
void |
test(@NotNull ExecutionContext<CommandActor> context)
Evaluates the condition.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforType, forTypeAndSubclassespublic void onPostExecuted(@NotNull
@NotNull ExecutableCommand<CommandActor> command,
@NotNull
@NotNull ExecutionContext<CommandActor> context)
PostCommandExecutedHookonPostExecuted in interface PostCommandExecutedHook<CommandActor>command - The command that will be executedcontext - The execution contextpublic void test(@NotNull
@NotNull ExecutionContext<CommandActor> context)
CommandCondition
Ideally, this should throw any exceptions if the condition fails, and lets
them get handled by the CommandExceptionHandler.
test in interface CommandCondition<CommandActor>context - The command context@Nullable public <T> @Nullable ContextParameter<CommandActor,T> create(@NotNull @NotNull java.lang.reflect.Type parameterType, @NotNull @NotNull AnnotationList annotations, @NotNull @NotNull Lamp<CommandActor> lamp)
ContextParameter.FactoryContextParametercreate in interface ContextParameter.Factory<CommandActor>T - The parameter typeparameterType - The command parameter to create forannotations - The parameter annotationslamp - The Lamp instance (for referencing other parameter types)ContextParameter, or null if this factory
cannot deal with it.