Class EnumAction<T extends Enum<T>>
java.lang.Object
io.github.projectunified.minigamecore.editor.extra.action.EnumAction<T>
- Type Parameters:
T- the type of the enum
- All Implemented Interfaces:
EditorAction
The
EditorAction for enum value-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EditorStringThe string of the message when the actor uses an invalid valuestatic final EditorStringThe string of the usage of the enum action -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomplete(EditorActor actor, String[] args) Get the completion suggestions, given the argumentsvoidexecute(EditorActor actor, String[] args) Execute the actionabstract voidexecute(EditorActor actor, T value, String[] args) Execute the actionusage()Get the usage of the actionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.projectunified.minigamecore.editor.EditorAction
description
-
Field Details
-
USAGE
The string of the usage of the enum action -
INVALID_VALUE
The string of the message when the actor uses an invalid value
-
-
Constructor Details
-
EnumAction
Create a new action- Parameters:
enumClass- the enum class
-
-
Method Details
-
execute
Execute the action- Parameters:
actor- the actorvalue- the valueargs- the arguments
-
usage
Description copied from interface:EditorActionGet the usage of the action- Specified by:
usagein interfaceEditorAction- Returns:
- the usage
-
complete
Description copied from interface:EditorActionGet the completion suggestions, given the arguments- Specified by:
completein interfaceEditorAction- Parameters:
actor- the actionargs- the argument- Returns:
- the suggestions
-
execute
Description copied from interface:EditorActionExecute the action- Specified by:
executein interfaceEditorAction- Parameters:
actor- the actorargs- the arguments
-