CommandAPI 12.1.0
An API for the command UI introduced in Minecraft 1.13
Loading...
Searching...
No Matches
dev.jorel.commandapi.arguments.LiteralArgument Class Reference

A pseudo-argument representing a single literal string. More...

Inheritance diagram for dev.jorel.commandapi.arguments.LiteralArgument:

Public Member Functions

 LiteralArgument (final String literal)
 A literal argument.
 LiteralArgument (String nodeName, final String literal)
 A literal argument.
Class< String > getPrimitiveType ()
String getLiteral ()
 Returns the literal string represented by this argument.
CommandAPIArgumentType getArgumentType ()
String getHelpString ()
Argument< T > instance ()
 Returns the instance of this class with the class Impl.
Impl instance ()
 Returns the instance of this class with the class Impl.

Static Public Member Functions

static LiteralArgument of (final String literal)
 A utility method to create a literal argument.
static LiteralArgument literal (final String literal)
 A utility method to create a literal argument.
static LiteralArgument of (String nodeName, final String literal)
 A utility method to create a literal argument.
static LiteralArgument literal (String nodeName, final String literal)
 A utility method to create a literal argument.

Detailed Description

A pseudo-argument representing a single literal string.

Since
1.3

Constructor & Destructor Documentation

◆ LiteralArgument() [1/2]

dev.jorel.commandapi.arguments.LiteralArgument.LiteralArgument ( final String literal)

A literal argument.

Only takes one string value which cannot be modified

Parameters
literalthe string literal that this argument will represent. Also acts as this argument's node name

◆ LiteralArgument() [2/2]

dev.jorel.commandapi.arguments.LiteralArgument.LiteralArgument ( String nodeName,
final String literal )

A literal argument.

Only takes one string value which cannot be modified

Parameters
nodeNamethe node name for this argument
literalthe string literal that this argument will represent

Member Function Documentation

◆ getLiteral()

String dev.jorel.commandapi.arguments.LiteralArgument.getLiteral ( )

Returns the literal string represented by this argument.

Returns
the literal string represented by this argument

◆ instance() [1/2]

Argument< T > dev.jorel.commandapi.arguments.Argument< T >.instance ( )
inherited

Returns the instance of this class with the class Impl.

Used for chaining builder methods.

◆ instance() [2/2]

Impl dev.jorel.commandapi.ChainableBuilder< Impl >.instance ( )
inherited

Returns the instance of this class with the class Impl.

Used for chaining builder methods.

◆ literal() [1/2]

LiteralArgument dev.jorel.commandapi.arguments.LiteralArgument.literal ( final String literal)
static

A utility method to create a literal argument.

Works as an alternative to dev.jorel.commandapi.arguments.LiteralArgument#of(String)

To provide easier use of this method you can statically import this: import static dev.jorel.commandapi.arguments.LiteralArgument.literal;

Parameters
literalthe string literal that this argument will represent
Returns
the literal argument created by this method

◆ literal() [2/2]

LiteralArgument dev.jorel.commandapi.arguments.LiteralArgument.literal ( String nodeName,
final String literal )
static

A utility method to create a literal argument.

Works as an alternative to dev.jorel.commandapi.arguments.LiteralArgument#of(String, String)

To provide easier use of this method you can statically import this: import static dev.jorel.commandapi.arguments.LiteralArgument.literal;

Parameters
literalthe string literal that this argument will represent
Returns
the literal argument created by this method

◆ of() [1/2]

LiteralArgument dev.jorel.commandapi.arguments.LiteralArgument.of ( final String literal)
static

A utility method to create a literal argument.

Works as an alternative to dev.jorel.commandapi.arguments.LiteralArgument#literal(String)

To provide easier use of this method you can statically import this: import static dev.jorel.commandapi.arguments.LiteralArgument.of;

Parameters
literalthe string literal that this argument will represent
Returns
the literal argument created by this method

◆ of() [2/2]

LiteralArgument dev.jorel.commandapi.arguments.LiteralArgument.of ( String nodeName,
final String literal )
static

A utility method to create a literal argument.

Works as an alternative to dev.jorel.commandapi.arguments.LiteralArgument#literal(String, String)

To provide easier use of this method you can statically import this: import static dev.jorel.commandapi.arguments.LiteralArgument.of;

Parameters
literalthe string literal that this argument will represent
Returns
the literal argument created by this method