Interface BlocksAttacksComponent.DamageReduction

All Superinterfaces:
ConfigurationSerializable
Enclosing interface:
BlocksAttacksComponent

public static interface BlocksAttacksComponent.DamageReduction extends ConfigurationSerializable
A damage reduction for a specific set of damage types.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    float
    Gets the constant amount of damage to be blocked.
    float
    Gets the proportion of damage to be blocked.
    float
    Gets the maximum angle at which attacks will be blocked (defaults to 90).
    Gets the types to which this reduction applies.
    void
    setBase(float base)
    Sets the constant amount of damage to be blocked.
    void
    setFactor(float factor)
    Sets the proportion of damage to be blocked.
    void
    setHorizontalBlockingAngle(float horizontalBlockingAngle)
    Sets the maximum angle at which attacks will be blocked (defaults to 90).
    void
    Sets the types to which this reduction applies.
    void
    Sets the types to which this reduction applies.
    void
    Sets the types to which this reduction applies.

    Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable Link icon

    serialize
  • Method Details Link icon

    • getTypes Link icon

      @Nullable Collection<DamageType> getTypes()
      Gets the types to which this reduction applies.
      Returns:
      the damage types
    • setTypes Link icon

      void setTypes(@Nullable DamageType type)
      Sets the types to which this reduction applies.
      Parameters:
      type - the damage types
    • setTypes Link icon

      void setTypes(@Nullable Collection<DamageType> types)
      Sets the types to which this reduction applies.
      Parameters:
      types - the damage types
    • setTypes Link icon

      void setTypes(@Nullable Tag<DamageType> tag)
      Sets the types to which this reduction applies.
      Parameters:
      tag - the damage tag
    • getBase Link icon

      float getBase()
      Gets the constant amount of damage to be blocked.
      Returns:
      base block amount
    • setBase Link icon

      void setBase(float base)
      Sets the constant amount of damage to be blocked.
      Parameters:
      base - new base amount
    • getFactor Link icon

      float getFactor()
      Gets the proportion of damage to be blocked.
      Returns:
      base blocking factor
    • setFactor Link icon

      void setFactor(float factor)
      Sets the proportion of damage to be blocked.
      Parameters:
      factor - new blocking factor
    • getHorizontalBlockingAngle Link icon

      float getHorizontalBlockingAngle()
      Gets the maximum angle at which attacks will be blocked (defaults to 90).
      Returns:
      maximum blocking angle
    • setHorizontalBlockingAngle Link icon

      void setHorizontalBlockingAngle(float horizontalBlockingAngle)
      Sets the maximum angle at which attacks will be blocked (defaults to 90).
      Parameters:
      horizontalBlockingAngle - new blocking angle