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

Class: EntityHurtBeforeEvent

event entity

Beta

包含与即将受到伤害的实体相关的信息。

Contains information related to an entity that will be hurt.

Properties

cancel

cancel: boolean

Beta


damage

damage: number

Beta

Remarks

描述将要造成的伤害量。

Describes the amount of damage that will be caused.


damageSource

readonly damageSource: EntityDamageSource

Beta

Remarks

可能施加此伤害的实体的来源信息。

Source information on the entity that may have applied this damage.


hurtEntity

readonly hurtEntity: Entity

Beta

Remarks

将要受到伤害的实体。

Entity that will be hurt.

同领域相关