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 Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.block.BlockEvent
block
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerList
getItem()
Gets the item that was used on the composter.void
setWillRaiseLevel
(boolean willRaiseLevel) Sets whether the composter will rise a level.boolean
Gets whether the composter will rise a level.Methods inherited from class org.bukkit.event.block.BlockEvent
getBlock
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
CompostItemEvent
-
-
Method Details
-
getItem
Gets the item that was used on the composter.- Returns:
- the item
-
willRaiseLevel
public boolean willRaiseLevel()Gets whether the composter will rise a level.- Returns:
true
if successful
-
setWillRaiseLevel
public 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:
getHandlers
in classEvent
-
getHandlerList
-