public class BlockBreakEvent extends Object implements BlockEvent, Cancellable
| Constructor and Description |
|---|
BlockBreakEvent(Entity entity,
Block block,
BlockState newState,
ItemInstance withItem,
Collection<ItemInstance> drops,
boolean instantBreak) |
| Modifier and Type | Method and Description |
|---|---|
Block |
getBlock() |
Collection<ItemInstance> |
getDrops() |
Entity |
getEntity() |
BlockState |
getNewState() |
ItemInstance |
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() |
public BlockBreakEvent(Entity entity, Block block, BlockState newState, ItemInstance withItem, Collection<ItemInstance> drops, boolean instantBreak)
public Entity getEntity()
public ItemInstance getWithItem()
public boolean willInstantBreak()
public void setInstantBreak(boolean instantBreak)
public Collection<ItemInstance> 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–2018 NukkitX. All rights reserved.