public class BlockDamageEvent extends BlockEvent implements Cancellable
If a Block Damage event is cancelled, the block will not be damaged.
Event.Result
block
コンストラクタと説明 |
---|
BlockDamageEvent(Player player,
Block block,
ItemStack itemInHand,
boolean instaBreak) |
修飾子とタイプ | メソッドと説明 |
---|---|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
boolean |
getInstaBreak()
Gets if the block is set to instantly break when damaged by the player.
|
ItemStack |
getItemInHand()
Gets the ItemStack for the item currently in the player's hand.
|
Player |
getPlayer()
Gets the player damaging 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.
|
void |
setInstaBreak(boolean bool)
Sets if the block should instantly break when damaged by the player.
|
getBlock
getEventName, isAsynchronous
public Player getPlayer()
public boolean getInstaBreak()
public void setInstaBreak(boolean bool)
bool
- true if you want the block to instantly break when damaged
by the playerpublic ItemStack getItemInHand()
public boolean isCancelled()
Cancellable
isCancelled
インタフェース内 Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
インタフェース内 Cancellable
cancel
- true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers
クラス内 Event
public static HandlerList getHandlerList()
Copyright © 2016. All rights reserved.