Package dev.jorel.commandapi.arguments
Class MultiLiteralArgument
java.lang.Object
dev.jorel.commandapi.AbstractArgumentTree<Argument<String>,Argument<?>,org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.AbstractArgument<String,Argument<String>,Argument<?>,org.bukkit.command.CommandSender>
- All Implemented Interfaces:
MultiLiteral<Argument<String>>,BukkitExecutable<Argument<String>>,ChainableBuilder<Argument<String>>,PlatformExecutable<Argument<String>,org.bukkit.command.CommandSender>
public class MultiLiteralArgument
extends Argument<String>
implements MultiLiteral<Argument<String>>
An argument that represents multiple LiteralArguments
- Since:
- 4.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> -
Constructor Summary
ConstructorsConstructorDescriptionMultiLiteralArgument(String[] literals) Deprecated, for removal: This API element is subject to removal in a future version.MultiLiteralArgument(String nodeName, String... literals) A multiliteral argument.MultiLiteralArgument(String nodeName, List<String> literals) Deprecated, for removal: This API element is subject to removal in a future version.UseMultiLiteralArgument(String, String...)instead -
Method Summary
Modifier and TypeMethodDescriptionCommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> 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<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> 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
thenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.jorel.commandapi.BukkitExecutable
executes, executes, executes, executes, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesConsole, executesConsole, executesConsole, executesConsole, executesEntity, executesEntity, executesEntity, executesEntity, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesNative, executesNative, executesNative, executesNative, executesPlayer, executesPlayer, executesPlayer, executesPlayer, executesProxy, executesProxy, executesProxy, executesProxy, executesRemoteConsole, executesRemoteConsole, executesRemoteConsole, executesRemoteConsoleMethods inherited from interface dev.jorel.commandapi.ChainableBuilder
instanceMethods inherited from interface dev.jorel.commandapi.PlatformExecutable
getExecutor
-
Field Details
-
executor
protected CommandAPIExecutor<org.bukkit.command.CommandSender,AbstractCommandSender<? extends org.bukkit.command.CommandSender>> executor
-
-
Constructor Details
-
MultiLiteralArgument
-
MultiLiteralArgument
Deprecated, for removal: This API element is subject to removal in a future version.UseMultiLiteralArgument(String, String...)insteadA multiliteral argument. Takes in string literals which cannot be modified- Parameters:
literals- the literals that this argument represents
-
MultiLiteralArgument
@Deprecated(since="9.1.0", forRemoval=true) public MultiLiteralArgument(String nodeName, List<String> literals) Deprecated, for removal: This API element is subject to removal in a future version.UseMultiLiteralArgument(String, String...)insteadA multiliteral argument. Takes in string literals which cannot be modified- Parameters:
nodeName- the node name for this argumentliterals- the literals that this argument represents
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveTypein classAbstractArgument<String,Argument<String>, Argument<?>, org.bukkit.command.CommandSender>
-
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<?>, org.bukkit.command.CommandSender>
-
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<?>, org.bukkit.command.CommandSender> - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExecutor
public CommandAPIExecutor<org.bukkit.command.CommandSender,AbstractCommandSender<? extends org.bukkit.command.CommandSender>> getExecutor() -
setExecutor
public void setExecutor(CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0) -
clearExecutors
-
MultiLiteralArgument(String, String...)instead