Class ManaAbilityActivateEvent

java.lang.Object
org.bukkit.event.Event
dev.aurelium.auraskills.api.event.mana.ManaAbilityActivateEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ManaAbilityActivateEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when a player activates a mana ability.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    ManaAbilityActivateEvent(org.bukkit.entity.Player player, SkillsUser user, ManaAbility manaAbility, int duration, double manaUsed)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the duration the mana ability will be active in ticks.
    static org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    Gets the mana ability that was activated.
    double
    Gets the amount of mana consumed by the activation.
    org.bukkit.entity.Player
    Gets the player that activated the mana ability.
    Gets the SkillsUser that activated the ability.
    boolean
     
    void
    setCancelled(boolean cancelled)
     
    void
    setDuration(int duration)
    Sets the duration the mana ability will be active for in ticks.
    void
    setManaUsed(double manaUsed)
    Sets the amount of mana consumed by the activation.

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ManaAbilityActivateEvent

      public ManaAbilityActivateEvent(org.bukkit.entity.Player player, SkillsUser user, ManaAbility manaAbility, int duration, double manaUsed)
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Gets the player that activated the mana ability.
      Returns:
      the player
    • getUser

      public SkillsUser getUser()
      Gets the SkillsUser that activated the ability.
      Returns:
      the user
    • getManaAbility

      public ManaAbility getManaAbility()
      Gets the mana ability that was activated.
      Returns:
      the mana ability
    • getDuration

      public int getDuration()
      Gets the duration the mana ability will be active in ticks.
      Returns:
      the duration in ticks
    • setDuration

      public void setDuration(int duration)
      Sets the duration the mana ability will be active for in ticks.
      Parameters:
      duration - duration in ticks
    • getManaUsed

      public double getManaUsed()
      Gets the amount of mana consumed by the activation.
      Returns:
      the mana used
    • setManaUsed

      public void setManaUsed(double manaUsed)
      Sets the amount of mana consumed by the activation.
      Parameters:
      manaUsed - the mana consumed
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()