Class SkillDowngradeTrigger
java.lang.Object
studio.magemonkey.fabled.dynamic.trigger.SkillDowngradeTrigger
- All Implemented Interfaces:
Trigger<PlayerSkillDowngradeEvent>
A trigger for when a player levels up a skill.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.LivingEntityFetches the caster as determined by the triggering event.getEvent()getKey()org.bukkit.entity.LivingEntitygetTarget(PlayerSkillDowngradeEvent event, Settings settings) Fetches the target as determined by the triggering event.voidsetValues(PlayerSkillDowngradeEvent event, CastData data) Reads data from the event and provides values to the caster's value data.booleanshouldTrigger(PlayerSkillDowngradeEvent event, int level, Settings settings) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface studio.magemonkey.fabled.dynamic.trigger.Trigger
postProcess
-
Constructor Details
-
SkillDowngradeTrigger
public SkillDowngradeTrigger()
-
-
Method Details
-
getKey
- Specified by:
getKeyin interfaceTrigger<PlayerSkillDowngradeEvent>- Returns:
- unique key for the trigger
-
getEvent
- Specified by:
getEventin interfaceTrigger<PlayerSkillDowngradeEvent>- Returns:
- class of the event related to the trigger
-
shouldTrigger
- Specified by:
shouldTriggerin interfaceTrigger<PlayerSkillDowngradeEvent>- Parameters:
event- event detailslevel- the level of the owning skillsettings- skill settings- Returns:
- true if the skill should activate, false otherwise
-
getCaster
Description copied from interface:TriggerFetches the caster as determined by the triggering event.- Specified by:
getCasterin interfaceTrigger<PlayerSkillDowngradeEvent>- Parameters:
event- event details- Returns:
- the one to apply the trigger for
-
getTarget
Description copied from interface:TriggerFetches the target as determined by the triggering event. This can be the same as the caster.- Specified by:
getTargetin interfaceTrigger<PlayerSkillDowngradeEvent>- Parameters:
event- event detailssettings- skill settings- Returns:
- the one being affected by the trigger (initial target)
-
setValues
Description copied from interface:TriggerReads data from the event and provides values to the caster's value data. This can be used within skills for more flexible effects. An example of this in base triggers is the Launch trigger providing the speed a projectile was launched so mechanics can replace it with equally-fast projectiles.- Specified by:
setValuesin interfaceTrigger<PlayerSkillDowngradeEvent>- Parameters:
event- event detailsdata- caster's value data to populate
-