Uses of Class
com.ultikits.ultitools.abstracts.command.CommandContext
Packages that use CommandContext
Package
Description
New command handling framework with improved architecture.
Command validation framework using Chain of Responsibility pattern.
Built-in command validators.
-
Uses of CommandContext in com.ultikits.ultitools.abstracts.command
Methods in com.ultikits.ultitools.abstracts.command that return CommandContextModifier and TypeMethodDescriptionCommandContext.withMatchedMethod(Method method, String format) Creates a new context with a matched method.CommandContext.withParsedParams(Map<String, String[]> params) Creates a new context with additional parsed parameters.Methods in com.ultikits.ultitools.abstracts.command with parameters of type CommandContextModifier and TypeMethodDescriptionprivate voidBaseCommandExecutor.armTimeoutWatcher(CommandContext context, AsyncCommand asyncCommand, AtomicBoolean reported) Arms the delayed watcher that reports a timeout message to the sender if the command body has not already completed by then.protected Object[]BaseCommandExecutor.buildMethodParams(CommandContext context, Method method) Builds the method parameters from the command context.private voidBaseCommandExecutor.dispatchAsyncCommand(CommandContext context, AsyncCommand asyncCommand, org.bukkit.scheduler.BukkitRunnable runnable, AtomicBoolean reported) Sends the optional "processing" message, dispatchesrunnableasynchronously exactly once, and arms the timeout watcher if configured.protected voidBaseCommandExecutor.executeCommand(CommandContext context, Method method, Object[] params, ValidatorChain.ChainValidationResult validationResult) Executes the command method.private booleanBaseCommandExecutor.handleGatedHelp(CommandContext context) Runs the sender-type and permission validators, then shows help if they pass.private voidBaseCommandExecutor.invokeCommandBody(CommandContext context, Method method, Object[] params, List<CommandValidator> ranValidators, TriggerContext triggerCtx, AtomicBoolean reported) Runs the matched command method plus its surrounding bookkeeping (audit-user context, post-action validator hooks, error reporting, the WIRE-12 completion flag) -- the body of theBukkitRunnableBaseCommandExecutor.executeCommand(com.ultikits.ultitools.abstracts.command.CommandContext, java.lang.reflect.Method, java.lang.Object[], com.ultikits.ultitools.abstracts.command.validation.ValidatorChain.ChainValidationResult)schedules.private voidBaseCommandExecutor.reportCommandExecutionError(CommandContext context, Method method, Exception e, TriggerContext triggerCtx) Sends the user-facing failure message, logs the exception, and best-effort reports it toErrorReportCollectorfor a command method that threw.private ObjectBaseCommandExecutor.resolveCmdParam(CommandContext context, Parameter parameter, Class<?> paramType) private ObjectBaseCommandExecutor.resolveParameter(CommandContext context, Parameter parameter) private ObjectBaseCommandExecutor.resolveSender(CommandContext context, Class<?> paramType) -
Uses of CommandContext in com.ultikits.ultitools.abstracts.command.validation
Methods in com.ultikits.ultitools.abstracts.command.validation with parameters of type CommandContextModifier and TypeMethodDescriptionstatic booleanValidatorChain.isApplicable(CommandValidator validator, CommandContext context) The single applicability check every caller must use before asking a validator toCommandValidator.validate(com.ultikits.ultitools.abstracts.command.CommandContext).default voidCommandValidator.onComplete(CommandContext context, boolean commandSucceeded) Invoked once, after the mapped command method has returned or thrown, for each validator whoseCommandValidator.validate(CommandContext)succeeded during the chain run that gated this invocation.default booleanCommandValidator.shouldValidate(CommandContext context) Checks if this validator should be applied to the given context.CommandValidator.validate(CommandContext context) Validates the command context.ValidatorChain.validate(CommandContext context) Validates the context through all validators in the chain.ValidatorChain.validateAll(CommandContext context) Validates the context through all validators, collecting all failures. -
Uses of CommandContext in com.ultikits.ultitools.abstracts.command.validation.validators
Methods in com.ultikits.ultitools.abstracts.command.validation.validators with parameters of type CommandContextModifier and TypeMethodDescriptionbooleanUsageLockValidator.acquireLock(CommandContext context) Acquires a lock for command execution.voidCooldownValidator.applyCooldown(CommandContext context) Applies cooldown after command execution.private CmdTarget.CmdTargetTypeSenderTypeValidator.determineTargetType(CommandContext context) Determines the effective target type from context or method annotation.private IntegerCooldownValidator.getCooldownSeconds(Method method, CommandContext context) private static booleanCooldownValidator.isBoundMapping(Method method, CommandContext context) voidCooldownValidator.onComplete(CommandContext context, boolean commandSucceeded) Post-action hook that applies the cooldown recorded for this invocation.voidUsageLockValidator.onComplete(CommandContext context, boolean commandSucceeded) Post-action hook that releases the lock acquired byUsageLockValidator.validate(CommandContext)for this invocation.voidUsageLockValidator.releaseLock(CommandContext context) Releases a lock after command execution.private static voidCooldownValidator.reportUnresolvedBinding(CommandContext context, IllegalStateException cause) CooldownValidator.unresolvedBinding(CommandContext context, Method method) Fails the command closed for a config-bound@CmdCDthis validator never had resolved -- reachable only when aCooldownValidatoris added after the module loaded, or an executor is registered outside the module loader.CooldownValidator.validate(CommandContext context) PermissionValidator.validate(CommandContext context) SenderTypeValidator.validate(CommandContext context) UsageLockValidator.validate(CommandContext context) Validates -- and, per the acquire-then-execute contract on this class, ATTEMPTS TO ACQUIRE -- the lock for this invocation.