Class NameableExecutor
java.lang.Object
ua.mcchickenstudio.opencreative.coding.blocks.executors.Executor
ua.mcchickenstudio.opencreative.coding.blocks.executors.other.NameableExecutor
- All Implemented Interfaces:
CodingBlock, ExtensionContent
NameableExecutor
This class represents an executor, that has name (custom id) to call it with other actions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal @NotNull StringReturns name of executor for calling it.voidsetCallName(@NotNull String name) Sets name of executor for calling it.Methods inherited from class Executor
decreaseCall, equals, executeActions, getActions, getBlockCategory, getEvent, getHandler, getID, getLastCalls, getLocaleName, getPlanet, getX, getY, getZ, hashCode, increaseCall, init, isDebug, isDisabled, run, setActions, setDebug, toStringModifier and TypeMethodDescriptionfinal voidDecreases calls amount by 1.final booleanprotected voidexecuteActions(@NotNull WorldEvent event) Executes all actions with specified event.final @NotNull ExecutorCategoryReturns coding block category of this executor.final WorldEventgetEvent()Returns last world event of executor.final ActionsHandlerfinal @NotNull StringgetID()Returns id of executor, that will be used to find it in registry.final intReturns how many times executor was called to execute actions.final @NotNull StringReturns localized name of executor.final @NotNull PlanetReturns planet, that was associated with executor.final intgetX()Returns X coordinate of coding block's location.final intgetY()Returns Y coordinate of coding block's location.final intgetZ()Returns Z coordinate of coding block's location.final inthashCode()final voidIncreases calls amount by 1.voidInitializes an executor and sets planet and coding block location.final booleanisDebug()Checks whether is executor block marked for debugging.final booleanChecks whether executor is disabled and cannot be called.voidrun(@NotNull WorldEvent event) Checks executor, executes actions and sends information about executor.final voidsetActions(@NotNull List<Action> actions) Sets actions list for executor.final voidsetDebug(boolean debug) Enables or disables sending debug logs about executor and actions inside.toString()Methods inherited from interface ExtensionContent
getDescription, getExtensionId, getName
-
Constructor Details
-
NameableExecutor
-
-
Method Details
-
setCallName
Sets name of executor for calling it.- Parameters:
name- new name to call it.
-
getCallName
Returns name of executor for calling it.- Returns:
- custom id of executor.
-