Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.
How can I use /testfor to see if someone is holding a diamond in their main hand?
Unfortunately, MCPE doesn’t support NBT tags and therefore this is not possible.
Source: Commands/testfor on Minecraft Gamepedia