Interface UseItemStackEvent

All Superinterfaces:
Event
All Known Subinterfaces:
UseItemStackEvent.Finish, UseItemStackEvent.Replace, UseItemStackEvent.Reset, UseItemStackEvent.Start, UseItemStackEvent.Stop, UseItemStackEvent.Tick

public interface UseItemStackEvent extends Event
Fired when an ItemStack is used.
  • Method Details

    • originalRemainingDuration

      Ticks originalRemainingDuration()
      Gets the original remaining duration of ItemStack in use.
      Returns:
      The original remaining duration
    • remainingDuration

      Ticks remainingDuration()
      Gets the remaining duration of ItemStack in use.
      Returns:
      The remaining duration
    • setRemainingDuration

      void setRemainingDuration(Ticks duration)
      Sets the remaining duration of ItemStack in use.
      Parameters:
      duration - The remaining duration to set
    • itemStackInUse

      ItemStackSnapshot itemStackInUse()
      Gets the ItemStack being consumed.
      Returns:
      The item being consumed