public class BlockDestroyEvent extends BlockEvent implements Cancellable
Event.Result
block
Constructor and Description |
---|
BlockDestroyEvent(@NotNull Block block,
@NotNull BlockData newState,
boolean willDrop) |
Modifier and Type | Method and Description |
---|---|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@NotNull BlockData |
getNewState() |
boolean |
isCancelled()
Gets the cancellation state of this event.
|
boolean |
playEffect() |
void |
setCancelled(boolean cancel)
If the event is cancelled, the block will remain in its previous state.
|
void |
setPlayEffect(boolean playEffect) |
boolean |
willDrop() |
getBlock
callEvent, getEventName, isAsynchronous
@NotNull public @NotNull BlockData getNewState()
public boolean willDrop()
public boolean playEffect()
public void setPlayEffect(boolean playEffect)
playEffect
- If the server should play the sound effect for this destructionpublic boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.