Skip to main content

Dying

Gets called when the player is dying.

Start a script sectionโ€‹

!-- OnEvent Dying
-- require @evPlayer @evAttacker *evDamageHandler $evIsAllowed

# Add your instructions here
  • Group: PlayerEvents
  • Cancellable: Yes
  • Event data: PlayerDyingEventArgs

Injected variablesโ€‹

VariableTypeDescription
@evPlayerplayer valueGets the player who is dying.
@evAttackerplayer valueGets the player who attacked.
*evDamageHandlerreference to StandardDamageHandler objectGets the damage handler who is causing death.
$evIsAllowedbool valueWhether the event is allowed to run.

Validated examples using this eventโ€‹