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

public class PlayerStopUsingItemEvent extends PlayerEvent
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

Constructors
Constructor
Description
`PlayerStopUsingItemEvent(@NotNull Player player, @NotNull ItemStack item, int ticksHeldFor)`

## Method Summary

Modifier and Type
Method
Description
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@NotNull ItemStack`
`getItem()`
Gets the exact item the player is releasing
`int`
`getTicksHeldFor()`
Gets the number of ticks the item was held for

### Methods inherited from class org.bukkit.event.player.PlayerEvent

`getPlayer`

### 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

### PlayerStopUsingItemEvent

public PlayerStopUsingItemEvent(@NotNull @NotNull Player player, @NotNull @NotNull ItemStack item, int ticksHeldFor)

## Method Details

### getItem

@NotNull public @NotNull ItemStack 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

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()