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 anItemStackis used.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceUseItemStackEvent.FinishFired when an item is finished 'normally', e.g.static interfaceUseItemStackEvent.ReplaceCalled afterUseItemStackEvent.Finish, when the item in the entity's hand is replaced.static interfaceUseItemStackEvent.ResetCalled before an entity's used item state is reset.static interfaceUseItemStackEvent.StartCalled beforeUseItemStackEvent.Tickwhen a player starts using anItemType, typically when they hold right mouse.static interfaceUseItemStackEvent.StopCalled afterUseItemStackEvent.Tickwhen anItemTypehas finished being used.static interfaceUseItemStackEvent.TickCalled afterUseItemStackEvent.Startduring each tick as anItemTypeis being used.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description ItemStackSnapshotitemStackInUse()Gets theItemStackbeing consumed.TicksoriginalRemainingDuration()Gets the original remaining duration ofItemStackin use.TicksremainingDuration()Gets the remaining duration ofItemStackin use.voidsetRemainingDuration(Ticks duration)Sets the remaining duration ofItemStackin use.
 
- 
- 
- 
Method Detail- 
originalRemainingDurationTicks originalRemainingDuration() Gets the original remaining duration ofItemStackin use.- Returns:
- The original remaining duration
 
 - 
remainingDurationTicks remainingDuration() Gets the remaining duration ofItemStackin use.- Returns:
- The remaining duration
 
 - 
setRemainingDurationvoid setRemainingDuration(Ticks duration) Sets the remaining duration ofItemStackin use.- Parameters:
- duration- The remaining duration to set
 
 - 
itemStackInUseItemStackSnapshot itemStackInUse() Gets theItemStackbeing consumed.- Returns:
- The item being consumed
 
 
- 
 
-