Package dev.jorel.commandapi.arguments
Class LiteralArgument
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:
Literal<Argument<String>>,ChainableBuilder<Argument<String>>,PlatformExecutable<Argument<String>,,com.velocitypowered.api.command.CommandSource> VelocityExecutable<Argument<String>>
A pseudo-argument representing a single literal string
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandAPIExecutor<com.velocitypowered.api.command.CommandSource, AbstractCommandSender<? extends com.velocitypowered.api.command.CommandSource>> -
Constructor Summary
ConstructorsConstructorDescriptionLiteralArgument(String literal) A literal argument.LiteralArgument(String nodeName, String literal) A literal argument. -
Method Summary
Modifier and TypeMethodDescriptionCommandAPIExecutor<com.velocitypowered.api.command.CommandSource, AbstractCommandSender<? extends com.velocitypowered.api.command.CommandSource>> Returns the literal string represented by this argumentstatic LiteralArgumentA utility method to create a literal argument.static LiteralArgumentA utility method to create a literal argument.static LiteralArgumentA utility method to create a literal argument.static LiteralArgumentA utility method to create a literal 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, 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
-
LiteralArgument
A literal argument. Only takes one string value which cannot be modified- Parameters:
literal- the string literal that this argument will represent
-
LiteralArgument
-
-
Method Details
-
of
A utility method to create a literal argument. Works as an alternative toliteral(String)To provide easier use of this method you can statically import this:
import static dev.jorel.commandapi.arguments.LiteralArgument.of;- Parameters:
literal- the string literal that this argument will represent- Returns:
- the literal argument created by this method
-
literal
A utility method to create a literal argument. Works as an alternative toof(String)To provide easier use of this method you can statically import this:
import static dev.jorel.commandapi.arguments.LiteralArgument.literal;- Parameters:
literal- the string literal that this argument will represent- Returns:
- the literal argument created by this method
-
of
A utility method to create a literal argument. Works as an alternative toliteral(String, String)To provide easier use of this method you can statically import this:
import static dev.jorel.commandapi.arguments.LiteralArgument.of;- Parameters:
literal- the string literal that this argument will represent- Returns:
- the literal argument created by this method
-
literal
A utility method to create a literal argument. Works as an alternative toof(String, String)To provide easier use of this method you can statically import this:
import static dev.jorel.commandapi.arguments.LiteralArgument.literal;- Parameters:
literal- the string literal that this argument will represent- Returns:
- the literal argument created by this method
-
getPrimitiveType
- Specified by:
getPrimitiveTypein classAbstractArgument<String,Argument<String>, Argument<?>, com.velocitypowered.api.command.CommandSource>
-
getLiteral
Returns the literal string represented by this argument- Specified by:
getLiteralin interfaceLiteral<Argument<String>>- Returns:
- the literal string represented by this argument
-
getArgumentType
- Specified by:
getArgumentTypein classAbstractArgument<String,Argument<String>, Argument<?>, com.velocitypowered.api.command.CommandSource>
-
getHelpString
- Overrides:
getHelpStringin 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
-