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

public class BlockFailedDispenseEvent extends BlockEvent
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
Constructor
Description
`BlockFailedDispenseEvent(@NotNull Block theBlock)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`callEvent()`
Calls the event and tests if cancelled.
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`boolean`
`shouldPlayEffect()`
`void`
`shouldPlayEffect(boolean playEffect)`
Sets if the effect for empty dispensers should be played

### Methods inherited from class org.bukkit.event.block.BlockEvent

`getBlock`

### Methods inherited from class org.bukkit.event.Event

`getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### BlockFailedDispenseEvent

public BlockFailedDispenseEvent(@NotNull @NotNull 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()
Calls the event and tests if cancelled.

Overrides:
  `callEvent` in class `Event`
Returns:
  `shouldPlayEffect()`

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()