Interface AttackRangeComponent

All Superinterfaces:
ConfigurationSerializable

@Experimental public interface AttackRangeComponent extends ConfigurationSerializable
Represents a component which dictates the attack range of the item.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Gets the margin applied to the target hitbox.
    float
    Gets the maximum distance the target must be from the attacker when the attacker is in creative mode.
    float
    Gets the maximum distance the target must be from the attacker.
    float
    Gets the minimum distance the target must be from the attacker when the attacker is in creative mode.
    float
    Gets the minimum distance the target must be from the attacker.
    float
    Gets the multiplier applied to reach when the item is used by a mob.
    void
    setHitboxMargin(float margin)
    Sets the margin applied to the target hitbox.
    void
    setMaxCreativeReach(float reach)
    Sets the maximum distance the target must be from the attacker when the attacker is in creative mode.
    void
    setMaxReach(float reach)
    Sets the maximum distance the target must be from the attacker.
    void
    setMinCreativeReach(float reach)
    Sets the minimum distance the target must be from the attacker when the attacker is in creative mode.
    void
    setMinReach(float reach)
    Sets the minimum distance the target must be from the attacker.
    void
    setMobFactor(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