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/ItemUseBeforeEvent.md.

Class: ItemUseBeforeEvent

event

Beta

包含与某次物品使用相关的信息。

Contains information related to an item being used.

Extends

Properties

cancel

cancel: boolean

Beta

Remarks

若设置为 true,则会取消该物品的使用行为。

If set to true, this will cancel the item use behavior.


itemStack

itemStack: ItemStack

Beta

Remarks

被使用的受影响物品堆。

The impacted item stack that is being used.

Inherited from

ItemUseAfterEvent.itemStack


source

readonly source: Player

Beta

Remarks

返回触发该物品事件的源实体。

Returns the source entity that triggered this item event.

Inherited from

ItemUseAfterEvent.source

同领域相关