Interface BlocksAttacksComponent.DamageReduction
- All Superinterfaces:
ConfigurationSerializable
- Enclosing interface:
BlocksAttacksComponent
A damage reduction for a specific set of damage types.
-
Method Summary
Modifier and TypeMethodDescriptionfloatgetBase()Gets the constant amount of damage to be blocked.floatGets the proportion of damage to be blocked.floatGets the maximum angle at which attacks will be blocked (defaults to 90).getTypes()Gets the types to which this reduction applies.voidsetBase(float base) Sets the constant amount of damage to be blocked.voidsetFactor(float factor) Sets the proportion of damage to be blocked.voidsetHorizontalBlockingAngle(float horizontalBlockingAngle) Sets the maximum angle at which attacks will be blocked (defaults to 90).voidsetTypes(Collection<DamageType> types) Sets the types to which this reduction applies.voidsetTypes(DamageType type) Sets the types to which this reduction applies.voidsetTypes(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
-