CommandAPI 9.5.2
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.arguments.EnumArgument< T extends Enum > Class Template Reference

An argument that represents multiple LiteralArguments. More...

+ Inheritance diagram for dev.jorel.commandapi.arguments.EnumArgument< T extends Enum >:

Classes

enum  MyEnum
 
interface  Nameable
 

Public Member Functions

 EnumArgument (String nodeName, T[] values)
 
 EnumArgument (String nodeName, String... literals)
 A multiliteral argument. More...
 
 EnumArgument (final String[] literals)
 A multiliteral argument. More...
 
 EnumArgument (String nodeName, final List< String > literals)
 A multiliteral argument. More...
 
Class< String > getPrimitiveType ()
 
String[] getLiterals ()
 Returns the literals that are present in this argument. More...
 
CommandAPIArgumentType getArgumentType ()
 
Argument< T > instance ()
 Returns the instance of this class with the class Impl. More...
 

Detailed Description

An argument that represents multiple LiteralArguments.

Since
4.1

Constructor & Destructor Documentation

◆ EnumArgument() [1/3]

dev.jorel.commandapi.arguments.EnumArgument< T extends Enum >.EnumArgument ( String  nodeName,
String...  literals 
)

A multiliteral argument.

Takes in string literals which cannot be modified

Parameters
nodeNamethe node name for this argument
literalsthe literals that this argument represents

◆ EnumArgument() [2/3]

dev.jorel.commandapi.arguments.EnumArgument< T extends Enum >.EnumArgument ( final String[]  literals)

A multiliteral argument.

Takes in string literals which cannot be modified

Parameters
literalsthe literals that this argument represents
Deprecated:
Use EnumArgument#MultiLiteralArgument(String, String...) instead

◆ EnumArgument() [3/3]

dev.jorel.commandapi.arguments.EnumArgument< T extends Enum >.EnumArgument ( String  nodeName,
final List< String >  literals 
)

A multiliteral argument.

Takes in string literals which cannot be modified

Parameters
nodeNamethe node name for this argument
literalsthe literals that this argument represents
Deprecated:
Use EnumArgument#MultiLiteralArgument(String, String...) instead

Member Function Documentation

◆ getArgumentType()

◆ getLiterals()

String[] dev.jorel.commandapi.arguments.EnumArgument< T extends Enum >.getLiterals ( )

Returns the literals that are present in this argument.

Returns
the literals that are present in this argument

Reimplemented from dev.jorel.commandapi.arguments.MultiLiteralArgument.

◆ getPrimitiveType()

Class< String > dev.jorel.commandapi.arguments.EnumArgument< T extends Enum >.getPrimitiveType ( )

◆ instance()

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.