Interface AttackRangeComponent
- All Superinterfaces:
ConfigurationSerializable
Represents a component which dictates the attack range of the item.
-
Method Summary
Modifier and TypeMethodDescriptionfloatGets the margin applied to the target hitbox.floatGets the maximum distance the target must be from the attacker when the attacker is in creative mode.floatGets the maximum distance the target must be from the attacker.floatGets the minimum distance the target must be from the attacker when the attacker is in creative mode.floatGets the minimum distance the target must be from the attacker.floatGets the multiplier applied to reach when the item is used by a mob.voidsetHitboxMargin(float margin) Sets the margin applied to the target hitbox.voidsetMaxCreativeReach(float reach) Sets the maximum distance the target must be from the attacker when the attacker is in creative mode.voidsetMaxReach(float reach) Sets the maximum distance the target must be from the attacker.voidsetMinCreativeReach(float reach) Sets the minimum distance the target must be from the attacker when the attacker is in creative mode.voidsetMinReach(float reach) Sets the minimum distance the target must be from the attacker.voidsetMobFactor(float factor) Sets the multiplier applied to reach when the item is used by a mob.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
Method Details
-
getMinReach
float getMinReach()Gets the minimum distance the target must be from the attacker.- Returns:
- minimum reach distance
-
setMinReach
void setMinReach(float reach) Sets the minimum distance the target must be from the attacker.- Parameters:
reach- minimum reach distance
-
getMaxReach
float getMaxReach()Gets the maximum distance the target must be from the attacker.- Returns:
- maximum reach
-
setMaxReach
void setMaxReach(float reach) Sets the maximum distance the target must be from the attacker.- Parameters:
reach- maximum reach
-
getMinCreativeReach
float getMinCreativeReach()Gets the minimum distance the target must be from the attacker when the attacker is in creative mode.- Returns:
- minimum reach distance
-
setMinCreativeReach
void setMinCreativeReach(float reach) Sets the minimum distance the target must be from the attacker when the attacker is in creative mode.- Parameters:
reach- minimum reach distance
-
getMaxCreativeReach
float getMaxCreativeReach()Gets the maximum distance the target must be from the attacker when the attacker is in creative mode.- Returns:
- maximum reach
-
setMaxCreativeReach
void setMaxCreativeReach(float reach) Sets the maximum distance the target must be from the attacker when the attacker is in creative mode.- Parameters:
reach- maximum reach
-
getHitboxMargin
float getHitboxMargin()Gets the margin applied to the target hitbox.- Returns:
- the margin
-
setHitboxMargin
void setHitboxMargin(float margin) Sets the margin applied to the target hitbox.- Parameters:
margin- target hitbox margin
-
getMobFactor
float getMobFactor()Gets the multiplier applied to reach when the item is used by a mob.- Returns:
- the multiplier
-
setMobFactor
void setMobFactor(float factor) Sets the multiplier applied to reach when the item is used by a mob.- Parameters:
factor- mob use multiplier
-