Class: ItemUseOnBeforeEvent
Contains information related to an item being used on a block.
Extends
Constructors
new ItemUseOnBeforeEvent()
private
new ItemUseOnBeforeEvent():ItemUseOnBeforeEvent
Returns
Overrides
ItemUseOnAfterEvent
. constructor
Properties
block
readonly
block:Block
Remarks
The block that the item is used on.
Inherited from
blockFace
readonly
blockFace:Direction
Remarks
The face of the block that an item is being used on.
Inherited from
ItemUseOnAfterEvent
. blockFace
cancel
cancel:
boolean
Remarks
If set to true, this will cancel the item use behavior.
faceLocation
readonly
faceLocation:Vector3
Remarks
Location relative to the bottom north-west corner of the block where the item is placed.
Inherited from
ItemUseOnAfterEvent
. faceLocation
itemStack
readonly
itemStack:ItemStack
Remarks
The impacted item stack that is being used on a block.
Inherited from
ItemUseOnAfterEvent
. itemStack
source
readonly
source:Player
Remarks
Returns the source entity that triggered this item event.