Package com.sucy.skill.dynamic.mechanic
Class BlockMechanic
java.lang.Object
com.sucy.skill.dynamic.EffectComponent
com.sucy.skill.dynamic.mechanic.MechanicComponent
com.sucy.skill.dynamic.mechanic.BlockMechanic
Mechanic that changes blocks for a duration before
returning them to what they were
-
Field Summary
Fields inherited from class com.sucy.skill.dynamic.EffectComponent
children, hasPreview, previewType, settings, skill -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoCleanUp(org.bukkit.entity.LivingEntity caster) booleanexecute(org.bukkit.entity.LivingEntity caster, int level, List<org.bukkit.entity.LivingEntity> targets, boolean force) Executes the componentgetKey()static booleanisPending(org.bukkit.Location loc) Checks whether the location is modified by a block mechanicMethods inherited from class com.sucy.skill.dynamic.mechanic.MechanicComponent
getTypeMethods inherited from class com.sucy.skill.dynamic.EffectComponent
cleanUp, execute, executeChildren, filter, getInstanceKey, getNum, getSettings, getSkillData, hasPreview, lastPassed, load, parseValues, playPreview, save
-
Constructor Details
-
BlockMechanic
public BlockMechanic()
-
-
Method Details
-
isPending
public static boolean isPending(org.bukkit.Location loc) Checks whether the location is modified by a block mechanic- Parameters:
loc- location to check- Returns:
- true if modified, false otherwise
-
getKey
- Specified by:
getKeyin classEffectComponent
-
doCleanUp
protected void doCleanUp(org.bukkit.entity.LivingEntity caster) - Overrides:
doCleanUpin classEffectComponent
-
execute
public boolean execute(org.bukkit.entity.LivingEntity caster, int level, List<org.bukkit.entity.LivingEntity> targets, boolean force) Executes the component- Specified by:
executein classEffectComponent- Parameters:
caster- caster of the skilllevel- level of the skilltargets- targets to apply toforce-- Returns:
- true if applied to something, false otherwise
-