Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I need a command to detect if a block is over a players head. I have only found commands to detect if the block is under a player. Do anyone have a command to detect blocks over players heads? :)
/execute @p ~ ~2 ~ testforblock ~ ~ ~ <block>
Replace with the block you would like to sense.
Required, but never shown