ArmorListeners
Implemented by
Index
Methods
optionalonHurt
Parameters
params: { attacker: number; bool1: boolean; bool2: boolean; damage: number; type: number }
additional data about damage
attacker: number
attacker entity or -1 if the damage was not caused by an entity
bool1: boolean
bool2: boolean
damage: number
damage amount that was applied to the player
type: number
damage type
item: ItemInstance
armor item instance
slot: number
armor slot index (from 0 to 3).
player: number
player entity uid
Returns any
the item instance to change armor item, if nothing is returned, armor will be damaged by default.
optionalonTakeOff
This event is called when player takes off or changes this armor item.
Parameters
item: ItemInstance
armor item instance
slot: number
armor slot index (from 0 to 3).
player: number
player entity uid
Returns void
optionalonTakeOn
This event is called when player takes on this armor, or spawns with it.
Parameters
item: ItemInstance
armor item instance
slot: number
armor slot index (from 0 to 3).
player: number
player entity uid
Returns void
optionalonTick
This event is called when the damage is dealt to the player that has this armor put on.
Parameters
item: ItemInstance
armor item instance
slot: number
armor slot index (from 0 to 3).
player: number
player entity uid
Returns any
the item instance to change armor item, if nothing is returned, armor will not be changed.
This event is called when the damage is dealt to the player that has this armor put on.