Skip to content

@minecraft/server


@minecraft/server / BlockComponentPlayerPlaceBeforeEvent

Class: BlockComponentPlayerPlaceBeforeEvent ​

Defined in: @minecraft/server/index.d.ts:4542

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

Extends ​

Properties ​

block ​

readonly block: Block

Defined in: @minecraft/server/index.d.ts:4790

Remarks ​

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

Inherited from ​

BlockEvent.block


cancel ​

cancel: boolean

Defined in: @minecraft/server/index.d.ts:4549

Remarks ​

If set to true, cancels the block place event.


dimension ​

readonly dimension: Dimension

Defined in: @minecraft/server/index.d.ts:4797

Remarks ​

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

Inherited from ​

BlockEvent.dimension


face ​

readonly face: Direction

Defined in: @minecraft/server/index.d.ts:4555

Remarks ​

The block face that was placed onto.


permutationToPlace ​

permutationToPlace: BlockPermutation

Defined in: @minecraft/server/index.d.ts:4563

Remarks ​

The block permutation that will be placed if the event is not cancelled. If set to a different block permutation, that permutation will be placed instead.


player? ​

readonly optional player?: Player

Defined in: @minecraft/server/index.d.ts:4569

Remarks ​

The player that is placing this block.