Skip to content

@minecraft/server


@minecraft/server / ItemStartUseOnAfterEvent

Class: ItemStartUseOnAfterEvent ​

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

Contains information related to an item being used on a block. This event fires when a player presses the the Use Item / Place Block button to successfully use an item or place a block. Fires for the first block that is interacted with when performing a build action. Note: This event cannot be used with Hoe or Axe items.

Properties ​

block ​

readonly block: Block

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

Remarks ​

The block that the item is used on.


blockFace ​

readonly blockFace: Direction

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

Remarks ​

The face of the block that an item is being used on.


itemStack? ​

readonly optional itemStack?: ItemStack

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

Remarks ​

The impacted item stack that is starting to be used. Can be undefined in some gameplay scenarios like pushing a button with an empty hand.


source ​

readonly source: Player

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

Remarks ​

Returns the source entity that triggered this item event.