Class OllivandersBookLearningPotionEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
net.pottercraft.ollivanders2.book.events.OllivandersBookLearningPotionEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class OllivandersBookLearningPotionEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Event whenever a potion is learned/leveled up from book learning
-
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
ConstructorsConstructorDescriptionOllivandersBookLearningPotionEvent(@NotNull org.bukkit.entity.Player player, @NotNull O2PotionType potion) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerListGet the handlers for this Event@NotNull org.bukkit.event.HandlerListGet the handlers for this Event@NotNull O2PotionTypeget the potion type that was learnedbooleanIs this event canceled?voidsetCancelled(boolean cancel) Set whether this event is canceled or notMethods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
OllivandersBookLearningPotionEvent
public OllivandersBookLearningPotionEvent(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull O2PotionType potion) Constructor- Parameters:
player- the player who found their wandpotion- the potion type that was learned
-
-
Method Details
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Get the handlers for this Event- Specified by:
getHandlersin classorg.bukkit.event.Event- Returns:
- the event handlers
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Get the handlers for this Event- Returns:
- the event handlers
-
getPotionType
get the potion type that was learned- Returns:
- the potion type
-
isCancelled
public boolean isCancelled()Is this event canceled?- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable- Returns:
- true if canceled, false otherwise
-
setCancelled
public void setCancelled(boolean cancel) Set whether this event is canceled or not- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
cancel- true if event should be canceled, false otherwise
-