Package io.papermc.paper.event.block
Class CompostItemEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
io.papermc.paper.event.block.CompostItemEvent
- Direct Known Subclasses:
- EntityCompostItemEvent
Called when an item is about to be composted by a hopper.
 To prevent hoppers from moving items into composters, cancel the 
InventoryMoveItemEvent.- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.block.BlockEventblock
- 
Constructor SummaryConstructorsConstructorDescriptionCompostItemEvent(@NotNull Block composter, @NotNull ItemStack item, boolean willRaiseLevel) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull HandlerListgetItem()Gets the item that was used on the composter.voidsetWillRaiseLevel(boolean willRaiseLevel) Sets whether the composter will rise a level.booleanGets whether the composter will rise a level.Methods inherited from class org.bukkit.event.block.BlockEventgetBlockMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
CompostItemEvent
 
- 
- 
Method Details- 
getItemGets the item that was used on the composter.- Returns:
- the item
 
- 
willRaiseLevelpublic boolean willRaiseLevel()Gets whether the composter will rise a level.- Returns:
- true if successful
 
- 
setWillRaiseLevelpublic void setWillRaiseLevel(boolean willRaiseLevel) Sets whether the composter will rise a level.- Parameters:
- willRaiseLevel- true if the composter should rise a level
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-