Class SkillUpgradeTrigger
java.lang.Object
studio.magemonkey.fabled.dynamic.trigger.SkillUpgradeTrigger
- All Implemented Interfaces:
Trigger<PlayerSkillUpgradeEvent>
A trigger for when a player levels up a skill.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.LivingEntitygetCaster(PlayerSkillUpgradeEvent event) Fetches the caster as determined by the triggering event.getEvent()getKey()org.bukkit.entity.LivingEntitygetTarget(PlayerSkillUpgradeEvent event, Settings settings) Fetches the target as determined by the triggering event.voidsetValues(PlayerSkillUpgradeEvent event, CastData data) Reads data from the event and provides values to the caster's value data.booleanshouldTrigger(PlayerSkillUpgradeEvent 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
-
SkillUpgradeTrigger
public SkillUpgradeTrigger()
-
-
Method Details
-
getKey
- Specified by:
getKeyin interfaceTrigger<PlayerSkillUpgradeEvent>- Returns:
- unique key for the trigger
-
getEvent
- Specified by:
getEventin interfaceTrigger<PlayerSkillUpgradeEvent>- Returns:
- class of the event related to the trigger
-
shouldTrigger
- Specified by:
shouldTriggerin interfaceTrigger<PlayerSkillUpgradeEvent>- Parameters:
event- event detailslevel- the level of the owning skillsettings- skill settings- Returns:
- true if the skill should activate, false otherwise
-
getCaster
Fetches the caster as determined by the triggering event.- Specified by:
getCasterin interfaceTrigger<PlayerSkillUpgradeEvent>- Parameters:
event- event details- Returns:
- the one to apply the trigger for
-
getTarget
Fetches the target as determined by the triggering event. This can be the same as the caster.- Specified by:
getTargetin interfaceTrigger<PlayerSkillUpgradeEvent>- Parameters:
event- event detailssettings- skill settings- Returns:
- the one being affected by the trigger (initial target)
-
setValues
Reads 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<PlayerSkillUpgradeEvent>- Parameters:
event- event detailsdata- caster's value data to populate
-