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-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomplete
(EditorActor actor, String[] args) Get the completion suggestions, given the argumentsboolean
execute
(EditorActor actor, String[] args) Execute the actionabstract boolean
execute
(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, wait
Methods inherited from interface io.github.projectunified.minigamecore.editor.EditorAction
description, requiresArgs
-
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- Returns:
- true if the action is executed successfully
-
usage
Description copied from interface:EditorAction
Get the usage of the action- Specified by:
usage
in interfaceEditorAction
- Returns:
- the usage
-
complete
Description copied from interface:EditorAction
Get the completion suggestions, given the arguments- Specified by:
complete
in interfaceEditorAction
- Parameters:
actor
- the actionargs
- the argument- Returns:
- the suggestions
-
execute
Description copied from interface:EditorAction
Execute the action- Specified by:
execute
in interfaceEditorAction
- Parameters:
actor
- the actorargs
- the arguments- Returns:
- true if the action is executed successfully
-