Class Condition
java.lang.Object
ua.mcchickenstudio.opencreative.coding.blocks.actions.Action
ua.mcchickenstudio.opencreative.coding.blocks.conditions.Condition
- All Implemented Interfaces:
CodingBlock
- Direct Known Subclasses:
EntityCondition,PlayerCondition,VariableCondition,WorldCondition
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleancheck(org.bukkit.entity.Entity entity) protected voidexecute(org.bukkit.entity.Entity entity) Executes action with specified entity.abstract @NotNull ActionCategoryReturns category of action, that contains information about action: glass pane materials, block materials.protected @Nullable ObjectgetEventValue(@NotNull Class<? extends EventValue> clazz) booleanfinal voidprepareAndExecute(@NotNull ActionsHandler handler) Prepares action for executing, sets handler and event, and executes action with target.Methods 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
-
Condition
public Condition(Executor executor, Target target, int x, Arguments args, List<Action> actions, List<Action> reactions, boolean isOpposed) Creates a Condition with linked executor and specified arguments.- Parameters:
executor- Executor where this action will be added.x- X from Action's block location in developers planet.args- List of arguments for action.
-
-
Method Details
-
check
public abstract boolean check(org.bukkit.entity.Entity entity) -
prepareAndExecute
Description copied from class:ActionPrepares action for executing, sets handler and event, and executes action with target.- Overrides:
prepareAndExecutein classAction- Parameters:
handler- ActionsHandler that stores event data and temporary variables.
-
execute
protected void execute(org.bukkit.entity.Entity entity) Description copied from class:ActionExecutes action with specified entity. -
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.
-
getActions
-
getElseActions
-
isOpposed
public boolean isOpposed() -
getEventValue
@Nullable protected @Nullable Object getEventValue(@NotNull @NotNull Class<? extends EventValue> clazz)
-