Class RepeatAction
java.lang.Object
ua.mcchickenstudio.opencreative.coding.blocks.actions.Action
ua.mcchickenstudio.opencreative.coding.blocks.actions.MultiAction
ua.mcchickenstudio.opencreative.coding.blocks.actions.repeatactions.RepeatAction
- All Implemented Interfaces:
CodingBlock
- Direct Known Subclasses:
RepeatAlwaysAction,RepeatForBlocksAction,RepeatForEachAction,RepeatForEntryAction,RepeatForLoopAction,RepeatOnCircleAction,RepeatWhileConditionAction,RepeatWhileConditionNotAction
RepeatAction
This class represents a repeat action, that will execute actions for many times while condition is met.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanChecks whether repeat action can continue repeating and executing the same actions.protected voidexecute(org.bukkit.entity.Entity entity) Executes action with specified entity.@NotNull ActionCategoryReturns category of action, that contains information about action: glass pane materials, block materials.voidIncreases call by 1 and checks limits.voidrepeat()voidsetMustStop(boolean mustStop) Sets whether repeat action should stop repeating itself.Methods inherited from class ua.mcchickenstudio.opencreative.coding.blocks.actions.MultiAction
executeActions, getActions, prepareAndExecuteMethods inherited from class ua.mcchickenstudio.opencreative.coding.blocks.actions.Action
getActionType, getArguments, getArgumentsList, getEntitiesByNameOrUUID, getEntity, getEntityByNameOrUUID, getEvent, getExecutor, getHandler, getPlanet, getPlayersByNameOrUUID, getTarget, getTargets, getWorld, getX, getY, getZ, setEntity, setEvent, setHandler, setVarValue
-
Constructor Details
-
RepeatAction
-
-
Method Details
-
execute
protected void execute(org.bukkit.entity.Entity entity) Description copied from class:ActionExecutes action with specified entity. -
repeat
public void repeat() -
increaseCalls
public void increaseCalls()Increases call by 1 and checks limits. -
setMustStop
public void setMustStop(boolean mustStop) Sets whether repeat action should stop repeating itself.- Parameters:
mustStop- true - stop repeater, false - continue.
-
checkCanContinue
public abstract boolean checkCanContinue()Checks whether repeat action can continue repeating and executing the same actions.- Returns:
- true - can continue and execute actions, false - stop repeater.
-
getActionCategory
Description copied from class:ActionReturns category of action, that contains information about action: glass pane materials, block materials.- Specified by:
getActionCategoryin classAction- Returns:
- Category of action.
-