Package cn.nukkit.event.block
Class BlockBreakEvent
java.lang.Object
cn.nukkit.event.Event
cn.nukkit.event.block.BlockEvent
cn.nukkit.event.block.BlockBreakEvent
- All Implemented Interfaces:
Cancellable
- Author:
- MagicDroidX (Nukkit Project)
-
Field Summary
Modifier and TypeFieldDescriptionprotected Item[]
protected int
protected final BlockFace
protected boolean
protected boolean
protected final Item
protected final Player
Fields inherited from class cn.nukkit.event.block.BlockEvent
block
-
Constructor Summary
ConstructorDescriptionBlockBreakEvent
(Player player, Block block, Item item, Item[] drops) BlockBreakEvent
(Player player, Block block, Item item, Item[] drops, boolean instaBreak) BlockBreakEvent
(Player player, Block block, Item item, Item[] drops, boolean instaBreak, boolean fastBreak) BlockBreakEvent
(Player player, Block block, BlockFace face, Item item, Item[] drops, boolean instaBreak, boolean fastBreak) -
Method Summary
Modifier and TypeMethodDescriptionint
Item[]
getDrops()
getFace()
static HandlerList
boolean
返回块是否可能在小于计算的时间内被破坏。通常创造玩家是true。getItem()
boolean
void
setDropExp
(int xp) void
void
setInstaBreak
(boolean instaBreak) Methods inherited from class cn.nukkit.event.block.BlockEvent
getBlock
Methods inherited from class cn.nukkit.event.Event
getEventName, isCancelled, setCancelled, setCancelled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cn.nukkit.event.Cancellable
isCancelled, setCancelled, setCancelled
-
Field Details
-
player
-
item
-
face
-
instaBreak
protected boolean instaBreak -
blockDrops
-
blockXP
protected int blockXP -
fastBreak
protected boolean fastBreak
-
-
Constructor Details
-
BlockBreakEvent
-
BlockBreakEvent
-
BlockBreakEvent
-
BlockBreakEvent
-
-
Method Details
-
getHandlers
-
getPlayer
-
getFace
-
getItem
-
getInstaBreak
public boolean getInstaBreak()返回块是否可能在小于计算的时间内被破坏。通常创造玩家是true。Returns whether the block may be broken in less than the amount of time calculated. This is usually true for creative players.
- Returns:
- the insta break
-
getDrops
-
setDrops
-
getDropExp
public int getDropExp() -
setDropExp
public void setDropExp(int xp) -
setInstaBreak
public void setInstaBreak(boolean instaBreak) -
isFastBreak
public boolean isFastBreak()
-