Package io.papermc.paper.event.player
Class PlayerStopUsingItemEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.PlayerStopUsingItemEvent
Called when the server detects a player stopping using an item.
Examples of this are letting go of the interact button when holding a bow, an edible item, or a spyglass.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerStopUsingItemEvent
(@NotNull Player player, @NotNull ItemStack item, int ticksHeldFor) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull HandlerList
getItem()
Gets the exact item the player is releasingint
Gets the number of ticks the item was held forMethods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
asynchronous, callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerStopUsingItemEvent
-
-
Method Details
-
getItem
Gets the exact item the player is releasing- Returns:
- ItemStack the exact item the player released
-
getTicksHeldFor
public int getTicksHeldFor()Gets the number of ticks the item was held for- Returns:
- int the number of ticks the item was held for
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-