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 ActiveEnchantment
getEnchantment()
Returns the enchantment about to be appliedHandlerList
getHandlers()
EnchantmentHolder
getHolder()
Returns the holder that the active enchantment is about to be added toboolean
isCancelled()
void
setCancelled(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:
isCancelled
in interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled)
- Specified by:
setCancelled
in interfaceCancellable
-
getHandlers
public HandlerList getHandlers()
- Specified by:
getHandlers
in classEvent
-
-