Class LandTrigger

java.lang.Object
studio.magemonkey.fabled.dynamic.trigger.LandTrigger
All Implemented Interfaces:
Trigger<PlayerLandEvent>

public class LandTrigger extends Object implements Trigger<PlayerLandEvent>
Fabled © 2024 studio.magemonkey.fabled.dynamic.trigger.BlockBreakTrigger
  • Constructor Details

    • LandTrigger

      public LandTrigger()
  • Method Details

    • getKey

      public String getKey()
      Specified by:
      getKey in interface Trigger<PlayerLandEvent>
      Returns:
      unique key for the trigger
    • getEvent

      public Class<PlayerLandEvent> getEvent()
      Specified by:
      getEvent in interface Trigger<PlayerLandEvent>
      Returns:
      class of the event related to the trigger
    • shouldTrigger

      public boolean shouldTrigger(PlayerLandEvent event, int level, Settings settings)
      Specified by:
      shouldTrigger in interface Trigger<PlayerLandEvent>
      Parameters:
      event - event details
      level - the level of the owning skill
      settings - skill settings
      Returns:
      true if the skill should activate, false otherwise
    • setValues

      public void setValues(PlayerLandEvent event, CastData data)
      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 interface Trigger<PlayerLandEvent>
      Parameters:
      event - event details
      data - caster's value data to populate
    • getCaster

      public org.bukkit.entity.LivingEntity getCaster(PlayerLandEvent event)
      Fetches the caster as determined by the triggering event.
      Specified by:
      getCaster in interface Trigger<PlayerLandEvent>
      Parameters:
      event - event details
      Returns:
      the one to apply the trigger for
    • getTarget

      public org.bukkit.entity.LivingEntity getTarget(PlayerLandEvent event, Settings settings)
      Fetches the target as determined by the triggering event. This can be the same as the caster.
      Specified by:
      getTarget in interface Trigger<PlayerLandEvent>
      Parameters:
      event - event details
      settings - skill settings
      Returns:
      the one being affected by the trigger (initial target)