Class DelayMechanic
java.lang.Object
org.yuemi.mmomechanics.api.skill.mechanic.DelayMechanic
- All Implemented Interfaces:
Mechanic
A Mechanic representing a execution pause in ticks or seconds.
-
Constructor Summary
ConstructorsConstructorDescriptionDelayMechanic(@NotNull String expression, boolean isSeconds) Constructs a DelayMechanic. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(@NotNull SkillContext context, @NotNull Collection<Target> targets) Executes this mechanic on the provided collection of targets.@NotNull StringGets the parsed delay expression.booleanChecks if the delay is represented in seconds.
-
Constructor Details
-
DelayMechanic
Constructs a DelayMechanic.- Parameters:
expression- the mathematical/string expression of the delay amountisSeconds- true if the delay is in seconds, false if in ticks
-
-
Method Details
-
getExpression
Gets the parsed delay expression.- Returns:
- the delay expression
-
isSeconds
public boolean isSeconds()Checks if the delay is represented in seconds.- Returns:
- true if seconds, false if ticks
-
execute
public void execute(@NotNull @NotNull SkillContext context, @NotNull @NotNull Collection<Target> targets) Description copied from interface:MechanicExecutes this mechanic on the provided collection of targets.
-