Interface UseItemStackEvent.Replace
- All Superinterfaces:
- Cancellable,- Event,- UseItemStackEvent
- Enclosing interface:
- UseItemStackEvent
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.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.spongepowered.api.event.item.inventory.UseItemStackEventUseItemStackEvent.Finish, UseItemStackEvent.Replace, UseItemStackEvent.Reset, UseItemStackEvent.Start, UseItemStackEvent.Stop, UseItemStackEvent.Tick
- 
Method SummaryModifier and TypeMethodDescriptionGets theItemStackthat is placed in the player's inventory in replacement of the stack that is currently being used.Methods inherited from interface org.spongepowered.api.event.CancellableisCancelled, setCancelledMethods inherited from interface org.spongepowered.api.event.item.inventory.UseItemStackEventitemStackInUse, originalRemainingDuration, remainingDuration, setRemainingDuration
- 
Method Details- 
itemStackResultTransaction<ItemStackSnapshot> itemStackResult()Gets theItemStackthat is placed in the player's inventory in replacement of the stack that is currently being used.- Returns:
- The result ItemStack
 
 
-