Interface UseItemStackEvent.Replace

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

public static interface UseItemStackEvent.Replace extends UseItemStackEvent, Cancellable
Called after UseItemStackEvent.Finish, when the item in the entity's hand is replaced.

For example, this event is called to decrement the amount of food in the stack being eaten.

In Vanilla, setting the remaining duration for this event is ignored.

Cancelling the event, or marking the transaction as invalid, will leave the entity's hand untouched.

  • Method Details