Planck's law describes the spectral distribution of electromagnetic radiation emitted by a blackbody, and it applies to blackbodies in general, regardless of whether they are in a cubic cavity or in open air.
A blackbody is an idealized object that absorbs all radiation incident upon it and emits radiation across a continuous spectrum of wavelengths. Planck's law accurately describes the emission spectrum of a blackbody at a given temperature, indicating the intensity of radiation at different wavelengths.
While the concept of a "Jeans cube" refers to a hypothetical cubic cavity used to study the radiation inside, it is not a necessary condition for Planck's law to apply. The law describes the radiation emitted by a blackbody at any location, whether it's in an enclosed cavity or in open air.
In practical terms, when considering real-world objects that are not perfect blackbodies, there may be deviations from the ideal behavior predicted by Planck's law. Factors such as reflection, transmission, and the specific properties of the object can affect the emission spectrum. However, for an ideal blackbody, Planck's law remains applicable regardless of its surroundings.