Interface UseItemStackEvent.Finish

  • All Superinterfaces:
    Cancellable, Event, UseItemStackEvent
    Enclosing interface:
    UseItemStackEvent

    public static interface UseItemStackEvent.Finish
    extends UseItemStackEvent, Cancellable
    Fired when an item is finished 'normally', e.g. used for the entire maximum duration. In contrast to UseItemStackEvent.Stop, this event will not fire if the item use was interrupted in any way.

    Examples:

    • Eating a piece of food
    • Drinking a potion

    This event will always be fired with an original duration of 0. Setting the duration to an integer greater than 0 will cause the entity to continue using the item.

    Cancelling this event prevents the 'finished' action from taking place. For example, this would prevent a Vanilla potion item from apply its effects to a player. UseItemStackEvent.Reset will then be fired, while UseItemStackEvent.Replace will be skipped.