Edit

EntityHurtBeforeEventSignal Class

Manages callbacks that are connected to when an entity will be hurt.

Methods

subscribe

subscribe(callback: (arg0: EntityHurtBeforeEvent) => void, options?: EntityHurtBeforeEventOptions): (arg0: EntityHurtBeforeEvent) => void

Adds a callback that will be called when an entity will be hurt.

Parameters

Returns (arg0: EntityHurtBeforeEvent) => void The returned closure is called with restricted-execution privilege.

Notes:

  • This function can't be called in restricted-execution mode.
  • This function can be called in early-execution mode.

unsubscribe

unsubscribe(callback: (arg0: EntityHurtBeforeEvent) => void): void

Removes a callback from being called when an entity will be hurt.

Parameters

  • callback: (arg0: EntityHurtBeforeEvent) => void This closure is called with restricted-execution privilege.

Notes:

  • This function can't be called in restricted-execution mode.
  • This function can be called in early-execution mode.