Package dev.jorel.commandapi.arguments
Class MultiLiteralArgument
java.lang.Object
dev.jorel.commandapi.AbstractArgumentTree<Argument<String>,Argument<?>,com.velocitypowered.api.command.CommandSource>
dev.jorel.commandapi.arguments.AbstractArgument<String,Argument<String>,Argument<?>,com.velocitypowered.api.command.CommandSource>
- All Implemented Interfaces:
MultiLiteral<Argument<String>>,ChainableBuilder<Argument<String>>,PlatformExecutable<Argument<String>,,com.velocitypowered.api.command.CommandSource> VelocityExecutable<Argument<String>>
public class MultiLiteralArgument
extends Argument<String>
implements MultiLiteral<Argument<String>>
An argument that represents multiple LiteralArguments
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandAPIExecutor<com.velocitypowered.api.command.CommandSource, AbstractCommandSender<? extends com.velocitypowered.api.command.CommandSource>> -
Constructor Summary
ConstructorsConstructorDescriptionMultiLiteralArgument(String nodeName, String... literals) A multiliteral argument. -
Method Summary
Modifier and TypeMethodDescriptionCommandAPIExecutor<com.velocitypowered.api.command.CommandSource, AbstractCommandSender<? extends com.velocitypowered.api.command.CommandSource>> String[]Returns the literals that are present in this argument<Source> StringparseArgument(com.mojang.brigadier.context.CommandContext<Source> cmdCtx, String key, CommandArguments previousArgs) voidsetExecutor(CommandAPIExecutor<com.velocitypowered.api.command.CommandSource, AbstractCommandSender<? extends com.velocitypowered.api.command.CommandSource>> arg0) Methods inherited from class dev.jorel.commandapi.arguments.AbstractArgument
combineWith, copyPermissionsAndRequirements, getArgumentPermission, getCombinedArguments, getEntityNames, getHelpString, getIncludedSuggestions, getNodeName, getOverriddenSuggestions, getRawType, getRequirements, hasCombinedArguments, includeSuggestions, isListed, isOptional, replaceSuggestions, setListed, setOptional, toString, withPermission, withPermission, withRequirementMethods inherited from class dev.jorel.commandapi.AbstractArgumentTree
then, thenNested, thenNestedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.jorel.commandapi.ChainableBuilder
instanceMethods inherited from interface dev.jorel.commandapi.PlatformExecutable
getExecutorMethods inherited from interface dev.jorel.commandapi.VelocityExecutable
executes, executes, executes, executes, executesConsole, executesConsole, executesConsole, executesConsole, executesPlayer, executesPlayer, executesPlayer, executesPlayer
-
Field Details
-
executor
protected CommandAPIExecutor<com.velocitypowered.api.command.CommandSource,AbstractCommandSender<? extends com.velocitypowered.api.command.CommandSource>> executor
-
-
Constructor Details
-
MultiLiteralArgument
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveTypein classAbstractArgument<String,Argument<String>, Argument<?>, com.velocitypowered.api.command.CommandSource>
-
getLiterals
Returns the literals that are present in this argument- Specified by:
getLiteralsin interfaceMultiLiteral<Argument<String>>- Returns:
- the literals that are present in this argument
-
getArgumentType
- Specified by:
getArgumentTypein classAbstractArgument<String,Argument<String>, Argument<?>, com.velocitypowered.api.command.CommandSource>
-
parseArgument
public <Source> String parseArgument(com.mojang.brigadier.context.CommandContext<Source> cmdCtx, String key, CommandArguments previousArgs) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parseArgumentin classAbstractArgument<String,Argument<String>, Argument<?>, com.velocitypowered.api.command.CommandSource> - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExecutor
public CommandAPIExecutor<com.velocitypowered.api.command.CommandSource,AbstractCommandSender<? extends com.velocitypowered.api.command.CommandSource>> getExecutor() -
setExecutor
public void setExecutor(CommandAPIExecutor<com.velocitypowered.api.command.CommandSource, AbstractCommandSender<? extends com.velocitypowered.api.command.CommandSource>> arg0) -
clearExecutors
-