Interface BlocksAttacks


@NullMarked @Experimental @NonExtendable public interface BlocksAttacks
Holds block attacks to the holding player like Shield.
See Also:
  • Method Details

    • blocksAttacks

      @Contract(value="-> new", pure=true) static BlocksAttacks.Builder blocksAttacks()
    • blockDelaySeconds

      float blockDelaySeconds()
      Gets the amount of time (in seconds) that use must be held before successfully blocking attacks.
      Returns:
      the delay in seconds
    • disableCooldownScale

      float disableCooldownScale()
      Gets the multiplier applied to the cooldown time for the item when attacked by a disabling attack (the multiplier for Weapon.disableBlockingForSeconds()).
      If set to 0, this item can never be disabled by attacks.
      Returns:
      the multiplier for the cooldown time
    • damageReductions

      List<DamageReduction> damageReductions()
      Gets a list of DamageReduction of how much damage should be blocked in a given attack.
      Returns:
      a list of damage reductions
    • itemDamage

      ItemDamageFunction itemDamage()
      Gets how much damage should be applied to the item from a given attack.
      Returns:
      the damage function
    • bypassedBy

      @Nullable TagKey<DamageType> bypassedBy()
      Gets the DamageType that can bypass the blocking.
      Returns:
      a damage type tag key, or null if there is no such tag key
    • blockSound

      @Nullable Key blockSound()
      Gets the key sound to play when an attack is successfully blocked.
      Returns:
      a key of the sound
    • disableSound

      @Nullable Key disableSound()
      Gets the key sound to play when the item goes on its disabled cooldown due to an attack.
      Returns:
      a key of the sound