Cancellable
public class BlockDropItemEvent extends BlockEvent implements Cancellable
Event.Result
block
Constructor | Description |
---|---|
BlockDropItemEvent(Block block,
BlockState blockState,
Player player,
List<Item> items) |
Modifier and Type | Method | Description |
---|---|---|
BlockState |
getBlockState() |
Gets the BlockState of the block involved in this event before it was
broken.
|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
List<Item> |
getItems() |
Gets list of the Item drops caused by the block break.
|
Player |
getPlayer() |
Gets the Player that is breaking the block involved in this event.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
getBlock
getEventName, isAsynchronous
public BlockDropItemEvent(@NotNull Block block, @NotNull BlockState blockState, @NotNull Player player, @NotNull List<Item> items)
@NotNull public Player getPlayer()
@NotNull public BlockState getBlockState()
@NotNull public List<Item> getItems()
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this event@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.