Interface BlocksAttacksComponent.DamageReduction
- All Superinterfaces:
ConfigurationSerializable
- Enclosing interface:
BlocksAttacksComponent
A damage reduction for a specific set of damage types.
-
Method Summary
Modifier and TypeMethodDescriptionfloat
getBase()
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).getTypes()
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
setTypes
(Collection<DamageType> types) Sets the types to which this reduction applies.void
setTypes
(DamageType type) Sets the types to which this reduction applies.void
setTypes
(Tag<DamageType> tag) Sets the types to which this reduction applies.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
Method Details
-
getTypes
Gets the types to which this reduction applies.- Returns:
- the damage types
-
setTypes
Sets the types to which this reduction applies.- Parameters:
type
- the damage types
-
setTypes
Sets the types to which this reduction applies.- Parameters:
types
- the damage types
-
setTypes
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
-