Package com.sucy.skill.dynamic.mechanic
Class ItemProjectileMechanic
java.lang.Object
com.sucy.skill.dynamic.EffectComponent
com.sucy.skill.dynamic.mechanic.MechanicComponent
com.sucy.skill.dynamic.mechanic.ItemProjectileMechanic
- All Implemented Interfaces:
ProjectileCallback
Launches a projectile using an item as its visual that applies child components upon landing
-
Field Summary
Fields inherited from class com.sucy.skill.dynamic.EffectComponent
children, hasPreview, previewType, settings, skill -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcallback(CustomProjectile projectile, org.bukkit.entity.LivingEntity hit) The callback for the projectiles that applies child componentsbooleanexecute(org.bukkit.entity.LivingEntity caster, int level, List<org.bukkit.entity.LivingEntity> targets, boolean force) Executes the componentgetKey()voidplayPreview(org.bukkit.entity.Player caster, int level, List<org.bukkit.entity.LivingEntity> targets, int step) Creates the list of indicators for the skillMethods inherited from class com.sucy.skill.dynamic.mechanic.MechanicComponent
getTypeMethods inherited from class com.sucy.skill.dynamic.EffectComponent
cleanUp, doCleanUp, execute, executeChildren, filter, getInstanceKey, getNum, getSettings, getSkillData, hasPreview, lastPassed, load, parseValues, save
-
Constructor Details
-
ItemProjectileMechanic
public ItemProjectileMechanic()
-
-
Method Details
-
playPreview
public void playPreview(org.bukkit.entity.Player caster, int level, List<org.bukkit.entity.LivingEntity> targets, int step) Creates the list of indicators for the skill- Overrides:
playPreviewin classEffectComponent- Parameters:
caster- caster referencelevel- the level of the skill to create fortargets- location to base location onstep- the current progress of the indicator
-
getKey
- Specified by:
getKeyin 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
-
callback
The callback for the projectiles that applies child components- Specified by:
callbackin interfaceProjectileCallback- Parameters:
projectile- projectile calling back forhit- the entity hit by the projectile, if any
-