Cancellablepublic class BlockDestroyEvent extends BlockEvent implements Cancellable
Event.Resultblock| Constructor | Description |
|---|---|
BlockDestroyEvent(Block block,
BlockData newState,
boolean willDrop) |
| Modifier and Type | Method | Description |
|---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
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() |
getBlockcallEvent, getEventName, isAsynchronous@NotNull public 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()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
setCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public HandlerList getHandlers()
getHandlers in class Event@NotNull public static HandlerList getHandlerList()
Copyright © 2019. All rights reserved.