Class UseItemEvent

java.lang.Object
org.bukkit.event.Event
com.sk89q.worldguard.bukkit.event.DelegateEvent
com.sk89q.worldguard.bukkit.event.inventory.UseItemEvent
All Implemented Interfaces:
Handleable, org.bukkit.event.Cancellable

public class UseItemEvent extends DelegateEvent
This event is an internal event. We do not recommend handling or throwing this event or its subclasses as the interface is highly subject to change.

Thrown when an item is used.

  • Constructor Details

    • UseItemEvent

      public UseItemEvent(@Nullable org.bukkit.event.Event originalEvent, Cause cause, org.bukkit.World world, org.bukkit.inventory.ItemStack itemStack)
  • Method Details

    • getWorld

      public org.bukkit.World getWorld()
      Get the world.
      Returns:
      the world
    • getItemStack

      public org.bukkit.inventory.ItemStack getItemStack()
      Get the item stack.
      Returns:
      the item stack
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()