Interface UseItemStackEvent.Finish
- All Superinterfaces:
Cancellable
,Event
,UseItemStackEvent
- Enclosing interface:
- UseItemStackEvent
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.event.item.inventory.UseItemStackEvent
UseItemStackEvent.Finish, UseItemStackEvent.Replace, UseItemStackEvent.Reset, UseItemStackEvent.Start, UseItemStackEvent.Stop, UseItemStackEvent.Tick
-
Method Summary
Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
Methods inherited from interface org.spongepowered.api.event.item.inventory.UseItemStackEvent
itemStackInUse, originalRemainingDuration, remainingDuration, setRemainingDuration