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.
  • Constructor Details

  • Method Details

    • getItem

      @NotNull public 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 HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      @NotNull public static HandlerList getHandlerList()