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 boolean
protected boolean
protected boolean
protected static final String
protected TargetComponent.IncludeCaster
protected boolean
Fields 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) boolean
execute
(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 componentvoid
load
(DynamicSkill skill, studio.magemonkey.codex.mccore.config.parse.DataSection config) Loads component data from the configurationvoid
playPreview
(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:EffectComponent
Retrieves the type of the component- Specified by:
getType
in 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:
execute
in 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:EffectComponent
Loads component data from the configuration- Overrides:
load
in 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 aRunnable
added to the providedList
.- Overrides:
playPreview
in classEffectComponent
- Parameters:
onPreviewStop
-List
ofRunnable
s to add tocaster
- caster referencelevel
- the level of the skill to preview fortargetSupplier
- targets to preview on
-
determineTargets
-