getHighestValidBlock

public static int getHighestValidBlock(Location location, int highestYLevel)

Returns the first usable feet height, or Integer.MIN_VALUE if no height fits.