For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server/classes/PlayerBreakBlockBeforeEvent.md.

Class: PlayerBreakBlockBeforeEvent

event player block

Beta

包含玩家破坏方块前的事件相关信息。

Contains information regarding an event before a player breaks a block.

Extends

Properties

block

readonly block: Block

Beta

Remarks

当前世界中此事件所在位置的方块。

Block currently in the world at the location of this event.

Inherited from

BlockEvent.block


cancel

cancel: boolean

Beta

如果设置为 true,则取消方块破坏事件。

Remarks

If set to true, cancels the block break event.


dimension

readonly dimension: Dimension

Beta

Remarks

包含此事件主体方块的维度。

Dimension that contains the block that is the subject of this event.

Inherited from

BlockEvent.dimension


itemStack?

optional itemStack?: ItemStack

Beta

用于破坏方块的物品堆,如果为空手则为 undefined

Remarks

The item stack that is being used to break the block, or undefined if empty hand.


player

readonly player: Player

Beta

破坏此方块的玩家。

Remarks

Player breaking the block for this event.

同领域相关