runelite-api/src/main/java/net/runelite/api/coords/WorldArea.java
/**
	 * Checks whether this area is within melee distance of another.
	 * <p>
	 * Melee distance is exactly 1 tile, so this method computes and returns
	 * whether the shortest distance to the passed area is directly
	 * on the outside of this areas edge.
	 *
	 * @param other the other area
	 * @return true if in melee distance, false otherwise
	 */
Checks whether this area is within melee distance of another.

Melee distance is exactly 1 tile, so this method computes and returns
whether the shortest distance to the passed area is directly
on the outside of this areas edge.

@param other the other area
@return true if in melee distance, false otherwise
Checks whether this area is within melee distance of another . Melee distance is exactly 1 tile so this method computes and returns whether the shortest distance to the passed area is directly on the outside of this areas edge . @param other the other area @return true if in melee distance false otherwise
public boolean isInMeleeDistance(WorldArea other)
	{
		if (other == null || this.getPlane() != other.getPlane())
		{
			return false;
		}
		Point distances = getAxisDistances(other);
		return distances.getX() + distances.getY() == 1;
	}
public boolean isInMeleeDistance ( WorldArea other ) { if ( other == null || this . getPlane ( ) != other . getPlane ( ) ) { return false ; } Point distances = getAxisDistances ( other ) ; return distances . getX ( ) + distances . getY ( ) == 1 ; }
Checks whether this area is within melee distance of another.
Checks whether this area is within melee distance of another .