Class BlockBreakEvent

All Implemented Interfaces:
Cancellable

public class BlockBreakEvent extends BlockEvent implements Cancellable
Author:
MagicDroidX (Nukkit Project)
  • Field Details

    • player

      protected final Player player
    • item

      protected final Item item
    • face

      protected final BlockFace face
    • instaBreak

      protected boolean instaBreak
    • blockDrops

      protected Item[] blockDrops
    • blockXP

      protected int blockXP
    • fastBreak

      protected boolean fastBreak
  • Constructor Details

    • BlockBreakEvent

      public BlockBreakEvent(Player player, Block block, Item item, Item[] drops)
    • BlockBreakEvent

      public BlockBreakEvent(Player player, Block block, Item item, Item[] drops, boolean instaBreak)
    • BlockBreakEvent

      public BlockBreakEvent(Player player, Block block, Item item, Item[] drops, boolean instaBreak, boolean fastBreak)
    • BlockBreakEvent

      public BlockBreakEvent(Player player, Block block, BlockFace face, Item item, Item[] drops, boolean instaBreak, boolean fastBreak)
  • Method Details

    • getHandlers

      public static HandlerList getHandlers()
    • getPlayer

      public Player getPlayer()
    • getFace

      public BlockFace getFace()
    • getItem

      public Item 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

      public Item[] getDrops()
    • setDrops

      public void setDrops(Item[] drops)
    • getDropExp

      public int getDropExp()
    • setDropExp

      public void setDropExp(int xp)
    • setInstaBreak

      public void setInstaBreak(boolean instaBreak)
    • isFastBreak

      public boolean isFastBreak()