Class ClickTrigger
java.lang.Object
studio.magemonkey.fabled.dynamic.trigger.ClickTrigger
- All Implemented Interfaces:
Trigger<KeyPressEvent>
- Direct Known Subclasses:
ClickLeftTrigger
,ClickRightTrigger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.LivingEntity
getCaster
(KeyPressEvent event) Fetches the caster as determined by the triggering event.getEvent()
abstract String
getKey()
org.bukkit.entity.LivingEntity
getTarget
(KeyPressEvent event, Settings settings) Fetches the target as determined by the triggering event.void
setValues
(KeyPressEvent event, CastData data) Reads data from the event and provides values to the caster's value data.abstract boolean
shouldTrigger
(KeyPressEvent event, int level, Settings settings) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface studio.magemonkey.fabled.dynamic.trigger.Trigger
postProcess
-
Constructor Details
-
ClickTrigger
public ClickTrigger()
-
-
Method Details
-
getKey
- Specified by:
getKey
in interfaceTrigger<KeyPressEvent>
- Returns:
- unique key for the trigger
-
getEvent
- Specified by:
getEvent
in interfaceTrigger<KeyPressEvent>
- Returns:
- class of the event related to the trigger
-
shouldTrigger
- Specified by:
shouldTrigger
in interfaceTrigger<KeyPressEvent>
- 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:
setValues
in interfaceTrigger<KeyPressEvent>
- Parameters:
event
- event detailsdata
- caster's value data to populate
-
getCaster
Fetches the caster as determined by the triggering event.- Specified by:
getCaster
in interfaceTrigger<KeyPressEvent>
- 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:
getTarget
in interfaceTrigger<KeyPressEvent>
- Parameters:
event
- event detailssettings
- skill settings- Returns:
- the one being affected by the trigger (initial target)
-