Class Function
java.lang.Object
ua.mcchickenstudio.opencreative.coding.blocks.executors.Executor
ua.mcchickenstudio.opencreative.coding.blocks.executors.other.NameableExecutor
ua.mcchickenstudio.opencreative.coding.blocks.executors.other.Function
- All Implemented Interfaces:
CodingBlock, ExtensionContent
Function
This class represents a function, that executes actions in same actions handler.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class NameableExecutor
getCallName, setCallNameModifier 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()
-
Constructor Details
-
Function
public Function()
-
-
Method Details
-
getExtensionId
Description copied from interface:ExtensionContentReturns lower-cased simple id of extension. Will be used to identify author of content.ID "default" is reserved for OpenCreative+ developers.
- Returns:
- id of extension.
-
getName
Description copied from interface:ExtensionContentReturns name of extension content. Will be displayed in list of extension content.- Returns:
- name of content.
-
getDescription
Description copied from interface:ExtensionContentReturns description of extension content. Describes purpose of new additional content.- Returns:
- description of content.
-