Interface IArmorJSCallback

interface IArmorJSCallback {
    hurt(params: IArmorHurtParams, slot: ItemInstance, index: number, durability: number): boolean;
    tick(slot: ItemInstance, index: number, durability: number): boolean;
}

Methods

Methods

  • Called when player deals damage if player wears the armor.

    Parameters

    • params: IArmorHurtParams

      additional data about damage

    • slot: ItemInstance

      current armor item instance

    • index: number

      armor slot, one of the EArmorType values

    • durability: number

      maximum damage the armor

    Returns boolean

    true, if changes to the item parameter should be applied, false otherwise.

  • Called every tick if player wears the armor.

    Parameters

    • slot: ItemInstance

      current armor item instance

    • index: number

      armor slot, one of the EArmorType values

    • durability: number

      maximum damage the armor

    Returns boolean

    true, if changes to the item parameter should be applied, false otherwise.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.