Class EnchantmentBookApplyEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- me.boboballoon.enhancedenchantments.events.EnchantmentBookApplyEvent
-
- All Implemented Interfaces:
Cancellable
public class EnchantmentBookApplyEvent extends Event implements Cancellable
An event that's fired every time a player tries to apply an enchantment book to an item
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
-
Constructor Summary
Constructors Constructor Description EnchantmentBookApplyEvent(ActiveEnchantment enchantment, EnchantmentHolder holder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActiveEnchantmentgetEnchantment()Returns the enchantment about to be appliedHandlerListgetHandlers()EnchantmentHoldergetHolder()Returns the holder that the active enchantment is about to be added tobooleanisCancelled()voidsetCancelled(boolean cancelled)-
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
-
-
-
Constructor Detail
-
EnchantmentBookApplyEvent
public EnchantmentBookApplyEvent(ActiveEnchantment enchantment, EnchantmentHolder holder)
-
-
Method Detail
-
getEnchantment
public ActiveEnchantment getEnchantment()
Returns the enchantment about to be applied- Returns:
- the enchantment about to be applied
-
getHolder
public EnchantmentHolder getHolder()
Returns the holder that the active enchantment is about to be added to- Returns:
- the holder that the active enchantment is about to be added to
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled)
- Specified by:
setCancelledin interfaceCancellable
-
getHandlers
public HandlerList getHandlers()
- Specified by:
getHandlersin classEvent
-
-