public class BlockBreakEvent extends Object implements BlockEvent, Cancellable
| Constructor and Description |
|---|
BlockBreakEvent(Entity entity,
Block block,
BlockState newState,
ItemStack withItem,
Collection<ItemStack> drops,
boolean instantBreak) |
| Modifier and Type | Method and Description |
|---|---|
Block |
getBlock() |
Collection<ItemStack> |
getDrops() |
Entity |
getEntity() |
BlockState |
getNewState() |
ItemStack |
getWithItem() |
boolean |
isCancelled()
Whether or not to cancel the event.
|
void |
setCancelled(boolean cancelled)
Decides whether to cancel the event.
|
void |
setInstantBreak(boolean instantBreak) |
void |
setNewState(BlockState newState) |
boolean |
willInstantBreak() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancelpublic BlockBreakEvent(Entity entity, Block block, BlockState newState, ItemStack withItem, Collection<ItemStack> drops, boolean instantBreak)
public Entity getEntity()
public ItemStack getWithItem()
public boolean willInstantBreak()
public void setInstantBreak(boolean instantBreak)
public Collection<ItemStack> getDrops()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface Cancellablecancelled - true to cancel the event.public Block getBlock()
getBlock in interface BlockEventpublic BlockState getNewState()
public void setNewState(@Nonnull BlockState newState)
Copyright © 2017–2019 NukkitX. All rights reserved.