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