Uses of Interface
com.ultikits.ultitools.abstracts.command.validation.CommandValidator
Packages that use CommandValidator
Package
Description
New command handling framework with improved architecture.
Command validation framework using Chain of Responsibility pattern.
Built-in command validators.
-
Uses of CommandValidator in com.ultikits.ultitools.abstracts.command
Methods in com.ultikits.ultitools.abstracts.command with parameters of type CommandValidatorModifier and TypeMethodDescriptionvoidBaseCommandExecutor.addValidator(CommandValidator validator) Adds a custom validator to the chain.private static booleanBaseCommandExecutor.isUsedByAnotherExecutor(CommandValidator validator, List<BaseCommandExecutor> others) Whether one ofothersstill dispatches throughvalidator(the same instance).voidBaseCommandExecutor.removeValidator(CommandValidator validator) Removes a validator from the chain.Method parameters in com.ultikits.ultitools.abstracts.command with type arguments of type CommandValidatorModifier and TypeMethodDescriptionprivate static voidBaseCommandExecutor.completeAll(CommandContext context, List<CommandValidator> ranValidators, boolean commandSucceeded) Calls every validator'sonCompletein chain order.private voidBaseCommandExecutor.dispatchAsyncCommand(CommandContext context, AsyncCommand asyncCommand, org.bukkit.scheduler.BukkitRunnable runnable, AtomicBoolean reported, List<CommandValidator> ranValidators) Sends the optional "processing" message, dispatchesrunnableasynchronously exactly once, and arms the timeout watcher if configured.private static voidBaseCommandExecutor.dispatchScheduled(CommandContext context, List<CommandValidator> ranValidators, Runnable schedule) Hands a body to the scheduler; if the scheduler refuses it (the plugin is disabling, for example), the body never runs and so never reaches itsonCompletehooks, so the validators that passed are told of the refusal instead (#568) before the exception leaves.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. -
Uses of CommandValidator in com.ultikits.ultitools.abstracts.command.validation
Fields in com.ultikits.ultitools.abstracts.command.validation declared as CommandValidatorModifier and TypeFieldDescriptionprivate final CommandValidatorValidatorChain.ChainValidationResult.failedValidatorFields in com.ultikits.ultitools.abstracts.command.validation with type parameters of type CommandValidatorModifier and TypeFieldDescriptionprivate final List<CommandValidator> ValidatorChain.ChainValidationResult.allFailedValidatorsprivate final List<CommandValidator> ValidatorChain.ChainValidationResult.passedValidatorsprivate final List<CommandValidator> ValidatorChain.Builder.validatorsprivate final List<CommandValidator> ValidatorChain.validatorsMethods in com.ultikits.ultitools.abstracts.command.validation that return CommandValidatorModifier and TypeMethodDescriptionValidatorChain.ChainValidationResult.getFailedValidator()Gets the first failed validator.Methods in com.ultikits.ultitools.abstracts.command.validation that return types with arguments of type CommandValidatorModifier and TypeMethodDescriptionValidatorChain.ChainValidationResult.getAllFailedValidators()Gets all failed validators.ValidatorChain.ChainValidationResult.getPassedValidators()Gets the ordered list of validators whosevalidate(CommandContext)succeeded during this chain run.ValidatorChain.getValidators()Gets an unmodifiable view of the validators.Methods in com.ultikits.ultitools.abstracts.command.validation with parameters of type CommandValidatorModifier and TypeMethodDescriptionValidatorChain.Builder.add(CommandValidator validator) Adds a validator to the chain.ValidatorChain.addValidator(CommandValidator validator) Adds a validator to the chain.(package private) static ValidatorChain.ChainValidationResultValidatorChain.ChainValidationResult.failure(CommandValidator failedValidator, CommandValidator.ValidationResult failedResult, List<CommandValidator.ValidationResult> allResults, List<CommandValidator> passedValidators) static booleanValidatorChain.isApplicable(CommandValidator validator, CommandContext context) The single applicability check every caller must use before asking a validator tovalidate(com.ultikits.ultitools.abstracts.command.CommandContext).ValidatorChain.removeValidator(CommandValidator validator) Removes a validator from the chain.Method parameters in com.ultikits.ultitools.abstracts.command.validation with type arguments of type CommandValidatorModifier and TypeMethodDescriptionValidatorChain.Builder.addAll(Collection<CommandValidator> validators) Adds all validators to the chain.(package private) static ValidatorChain.ChainValidationResultValidatorChain.ChainValidationResult.multipleFailures(List<CommandValidator> failedValidators, List<CommandValidator.ValidationResult> allResults, List<CommandValidator> passedValidators) static voidValidatorChain.notifyRefused(CommandContext context, List<CommandValidator> passedValidators) CallsonRefused(CommandContext)on each ofpassedValidators, in order, for a dispatch refused after they passed and before the mapped method ran (#568).private static RuntimeExceptionValidatorChain.notifyRefused(CommandContext context, List<CommandValidator> passedValidators, RuntimeException pending) Runs every refusal hook; returns the first exception a hook threw, or attaches it topending(an exception already on its way out) and returnsnull.ValidatorChain.removeValidators(Class<? extends CommandValidator> validatorClass) Removes all validators of the specified type.Constructors in com.ultikits.ultitools.abstracts.command.validation with parameters of type CommandValidatorModifierConstructorDescriptionprivateChainValidationResult(boolean valid, CommandValidator failedValidator, List<CommandValidator> allFailedValidators, CommandValidator.ValidationResult failedResult, List<CommandValidator.ValidationResult> allResults, List<CommandValidator> passedValidators) Constructor parameters in com.ultikits.ultitools.abstracts.command.validation with type arguments of type CommandValidatorModifierConstructorDescriptionprivateChainValidationResult(boolean valid, CommandValidator failedValidator, List<CommandValidator> allFailedValidators, CommandValidator.ValidationResult failedResult, List<CommandValidator.ValidationResult> allResults, List<CommandValidator> passedValidators) ValidatorChain(Collection<CommandValidator> validators) Creates a validator chain with the specified validators. -
Uses of CommandValidator in com.ultikits.ultitools.abstracts.command.validation.validators
Classes in com.ultikits.ultitools.abstracts.command.validation.validators that implement CommandValidatorModifier and TypeClassDescriptionclassValidates and manages command cooldowns for players.classValidates that the command sender has the required permission.classValidates that the command sender matches the expected target type.classValidates and manages command usage locks to prevent concurrent execution.