do a ContainerBoxSearch where you plan to put the player that checks for bricks, interiors, etc.
initContainerBoxSearch(%positionXYZ,%sizeXYZ,$typemasks::fxBrickObjectType | $typemasks::interiorObjectType ... );
%target=containerSearchNext()
Note that the box search position is located at the exact center of the box, while the player is actually "located" at a point in between its feet, so you'll have to compensate for that. I think the player's size is something like "1.5 1.5 2.5", but I could be wrong.