public class BlockBreakEvent extends BlockExpEvent implements Cancellable
If you wish to have the block drop experience, you must set the experience value above 0. By default, experience will be set in the event if:
Note: Plugins wanting to simulate a traditional block drop should set the block to air and utilize their own methods for determining what the default drop for the block being broken is and what to do about it, if anything.
If a Block Break event is cancelled, the block will not break and experience will not drop.
Event.Result
block
コンストラクタと説明 |
---|
BlockBreakEvent(Block theBlock,
Player player) |
修飾子とタイプ | メソッドと説明 |
---|---|
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.
|
getExpToDrop, getHandlerList, getHandlers, setExpToDrop
getBlock
getEventName, isAsynchronous
public Player getPlayer()
public boolean isCancelled()
Cancellable
isCancelled
インタフェース内 Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
インタフェース内 Cancellable
cancel
- true if you wish to cancel this eventCopyright © 2016. All rights reserved.