Class BlockFailedDispenseEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
io.papermc.paper.event.block.BlockFailedDispenseEvent

@NullMarked public class BlockFailedDispenseEvent extends BlockEvent
Called when a block tries to dispense an item, but its inventory is empty.
  • Constructor Details

    • BlockFailedDispenseEvent

      @Internal public BlockFailedDispenseEvent(Block theBlock)
  • 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: Event
      Calls the event and tests if cancelled.
      Overrides:
      callEvent in class Event
      Returns:
      shouldPlayEffect()
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()