Interface Editor<T>
- Type Parameters:
T
- the type of the exported object
- All Superinterfaces:
EditorAction
- All Known Implementing Classes:
ListEditor
,ValueEditor
The Editor
-
Method Summary
Modifier and TypeMethodDescriptionactions()
The map of all available actions of the editordefault Collection
<String> complete
(EditorActor actor, String[] args) Get the completion suggestions, given the argumentsdefault String
Get the description of the actiondefault boolean
execute
(EditorActor actor, String[] args) Execute the actionexport
(EditorActor actor) Export the object from the editorvoid
Migrate from the objectvoid
reset()
Reset the editorstatus()
Get an object representing the status of the editordefault String
usage()
Get the usage of the actionMethods inherited from interface io.github.projectunified.minigamecore.editor.EditorAction
requiresArgs
-
Method Details
-
actions
Map<String,EditorAction> actions()The map of all available actions of the editor- Returns:
- the action map
-
reset
void reset()Reset the editor -
status
Object status()Get an object representing the status of the editor- Returns:
- the status
-
export
Export the object from the editor- Parameters:
actor
- the actor- Returns:
- the object if it's exported successfully, otherwise empty
-
migrate
Migrate from the object- Parameters:
data
- the object
-
description
Description copied from interface:EditorAction
Get the description of the action- Specified by:
description
in interfaceEditorAction
- Returns:
- the description
-
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
-