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 TypeMethodDescriptionintGets the duration the mana ability will be active in ticks.static org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListGets the mana ability that was activated.doubleGets the amount of mana consumed by the activation.org.bukkit.entity.PlayerGets the player that activated the mana ability.getUser()Gets theSkillsUserthat activated the ability.booleanvoidsetCancelled(boolean cancelled) voidsetDuration(int duration) Sets the duration the mana ability will be active for in ticks.voidsetManaUsed(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 theSkillsUserthat 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:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-