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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionUseItemEvent
(org.bukkit.event.Event originalEvent, Cause cause, org.bukkit.World world, org.bukkit.inventory.ItemStack itemStack) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.inventory.ItemStack
Get the item stack.org.bukkit.World
getWorld()
Get the world.Methods inherited from class com.sk89q.worldguard.bukkit.event.DelegateEvent
getCause, getOriginalEvent, getRelevantFlags, getResult, isCancelled, isSilent, setAllowed, setCancelled, setResult, setSilent
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
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 classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-