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.Resultblock| コンストラクタと説明 |
|---|
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, setExpToDropgetBlockgetEventName, isAsynchronouspublic Player getPlayer()
public boolean isCancelled()
CancellableisCancelled インタフェース内 Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled インタフェース内 Cancellablecancel - true if you wish to cancel this eventCopyright © 2016. All rights reserved.