Class AutoEnchantEvent

java.lang.Object
org.bukkit.event.Event
io.github.thebusybiscuit.slimefun4.api.events.AutoEnchantEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class AutoEnchantEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
An Event that is called whenever an AutoEnchanter is trying to enchant an ItemStack.
Author:
WalshyDev
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    AutoEnchantEvent(org.bukkit.inventory.ItemStack item)
     
    AutoEnchantEvent(org.bukkit.inventory.ItemStack item, org.bukkit.block.Block block)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.block.Block
    This returns the Block that is enchanting items
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    org.bukkit.inventory.ItemStack
    This returns the ItemStack that is being enchanted.
    boolean
     
    void
    setCancelled(boolean cancel)
     

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AutoEnchantEvent

      public AutoEnchantEvent(@Nonnull org.bukkit.inventory.ItemStack item)
    • AutoEnchantEvent

      public AutoEnchantEvent(@Nonnull org.bukkit.inventory.ItemStack item, @Nullable org.bukkit.block.Block block)
  • Method Details

    • getItem

      @Nonnull public org.bukkit.inventory.ItemStack getItem()
      This returns the ItemStack that is being enchanted.
      Returns:
      The ItemStack that is being enchanted
    • getBlock

      @Nullable public org.bukkit.block.Block getBlock()
      This returns the Block that is enchanting items
      Returns:
      The Block that is enchanting items
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlerList

      @Nonnull public static org.bukkit.event.HandlerList getHandlerList()
    • getHandlers

      @Nonnull public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event