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
ConstructorsConstructorDescriptionManaAbilityActivateEvent
(org.bukkit.entity.Player player, SkillsUser user, ManaAbility manaAbility, int duration, double manaUsed) -
Method Summary
Modifier and TypeMethodDescriptionint
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.getUser()
Gets theSkillsUser
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
-
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
Gets theSkillsUser
that activated the ability.- Returns:
- the user
-
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 interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-