Package io.papermc.paper.event.block
Class BlockFailedDispenseEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
io.papermc.paper.event.block.BlockFailedDispenseEvent
Called when a block tries to dispense an item, but its inventory is empty.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCalls the event and tests if cancelled.static HandlerListbooleanvoidshouldPlayEffect(boolean playEffect) Sets if the effect for empty dispensers should be playedMethods inherited from class org.bukkit.event.block.BlockEvent
getBlockMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
BlockFailedDispenseEvent
-
-
Method Details
-
shouldPlayEffect
public boolean shouldPlayEffect()- Returns:
- if the effect should be played
-
shouldPlayEffect
public void shouldPlayEffect(boolean playEffect) Sets if the effect for empty dispensers should be played- Parameters:
playEffect- if the effect should be played
-
callEvent
public boolean callEvent()Description copied from class:EventCalls the event and tests if cancelled.- Overrides:
callEventin classEvent- Returns:
shouldPlayEffect()
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-