Package com.vk2gpz.tokenenchant.event
Class TEPlayerEffectRemovedEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.vk2gpz.tokenenchant.event.TEPlayerEffectRemovedEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class TEPlayerEffectRemovedEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Called when TokenEnchant's custom enchant casts a potion effect on other player.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorsConstructorDescriptionTEPlayerEffectRemovedEvent
(org.bukkit.entity.Player who, org.bukkit.potion.PotionEffect potion) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
@NotNull org.bukkit.event.HandlerList
org.bukkit.potion.PotionEffect
Returns the potion effect to be appliedboolean
Gets the cancellation state of this event.void
setCancelled
(boolean cancel) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
TEPlayerEffectRemovedEvent
public TEPlayerEffectRemovedEvent(org.bukkit.entity.Player who, org.bukkit.potion.PotionEffect potion) Constructor- Parameters:
who
- The target player, who will get the specified potion effect applied topotion
- The effect to be applied
-
-
Method Details
-
getPotionEffect
public org.bukkit.potion.PotionEffect getPotionEffect()Returns the potion effect to be applied- Returns:
- the potion effect to be applied
-
isCancelled
public boolean isCancelled()Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
- Returns:
- true if this event is cancelled
-
setCancelled
public void setCancelled(boolean cancel) Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
- Parameters:
cancel
- true if you wish to cancel this event
-
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()
-