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.
このイベントがキャンセルされた場合ブロックの破壊はされず経験値もドロップされません。
Event.Result
block
Constructor and Description |
---|
BlockBreakEvent(Block theBlock,
Player player) |
Modifier and Type | Method and Description |
---|---|
Player |
getPlayer()
ブロックを破壊したプレイヤーを取得します。
|
boolean |
isCancelled()
他のリスナーがイベントをキャンセルしているか判定します。
|
void |
setCancelled(boolean cancel)
イベントをキャンセルをするか設定します。
|
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 でイベントをキャンセルします。Copyright © 2015. All rights reserved.