Class TargetComponent
java.lang.Object
studio.magemonkey.fabled.dynamic.EffectComponent
studio.magemonkey.fabled.dynamic.target.TargetComponent
- Direct Known Subclasses:
AreaTarget,ConeTarget,LinearTarget,LocationTarget,NearestTarget,OffsetTarget,RememberTarget,SelfTarget,SingleTarget,WorldTarget
Fabled © 2024
studio.magemonkey.fabled.dynamic.target.TargetComponent
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected static final Stringprotected TargetComponent.IncludeCasterprotected booleanFields inherited from class studio.magemonkey.fabled.dynamic.EffectComponent
children, preview, settings, skill -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.bukkit.entity.LivingEntity> determineTargets(org.bukkit.entity.LivingEntity caster, int level, List<org.bukkit.entity.LivingEntity> from, Function<org.bukkit.entity.LivingEntity, List<org.bukkit.entity.LivingEntity>> conversion) booleanexecute(org.bukkit.entity.LivingEntity caster, int level, List<org.bukkit.entity.LivingEntity> targets, boolean force) Executes the componentabstract List<org.bukkit.entity.LivingEntity> getTargets(org.bukkit.entity.LivingEntity caster, int level, List<org.bukkit.entity.LivingEntity> targets) getType()Retrieves the type of the componentvoidload(DynamicSkill skill, studio.magemonkey.codex.mccore.config.parse.DataSection config) Loads component data from the configurationvoidplayPreview(List<Runnable> onPreviewStop, org.bukkit.entity.Player caster, int level, Supplier<List<org.bukkit.entity.LivingEntity>> targetSupplier) Starts the component's preview effects.Methods inherited from class studio.magemonkey.fabled.dynamic.EffectComponent
cleanUp, doCleanUp, execute, executeChildren, filter, getInstanceKey, getKey, getNum, getSettings, getSkillData, isPreviewEnabled, lastPassed, parseValues, playChildrenPreviews, save
-
Field Details
-
MAX
- See Also:
-
everyone
protected boolean everyone -
allies
protected boolean allies -
throughWall
protected boolean throughWall -
invulnerable
protected boolean invulnerable -
self
-
-
Constructor Details
-
TargetComponent
public TargetComponent()
-
-
Method Details
-
getType
Description copied from class:EffectComponentRetrieves the type of the component- Specified by:
getTypein classEffectComponent- Returns:
- component type
-
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- whether the execution is being forced- Returns:
- true if applied to something, false otherwise
-
load
public void load(DynamicSkill skill, studio.magemonkey.codex.mccore.config.parse.DataSection config) Description copied from class:EffectComponentLoads component data from the configuration- Overrides:
loadin classEffectComponent- Parameters:
skill- owning skill of the componentconfig- config data to load from
-
getTargets
-
playPreview
public void playPreview(List<Runnable> onPreviewStop, org.bukkit.entity.Player caster, int level, Supplier<List<org.bukkit.entity.LivingEntity>> targetSupplier) Starts the component's preview effects. Removal of any registered listeners, tasks, entities, or other temporary effects should be included in aRunnableadded to the providedList.- Overrides:
playPreviewin classEffectComponent- Parameters:
onPreviewStop-ListofRunnables to add tocaster- caster referencelevel- the level of the skill to preview fortargetSupplier- targets to preview on
-
determineTargets
-