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

    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

    serialize
  • Method Details

    • getTypes

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

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

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

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

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

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

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

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

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

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