testfor wont recognize what its supposed to

testfor wont recognize what its supposed to - Cup of aromatic cappuccino with Thank You words on foam

I'm in 1.12.2.

And here's the command I'm trying to do:

testfor THE_ELEMENT_KING {inventory:[{id:"minecraft:diamond"}]}

But even when I have a diamond in my inventory it says I didn't match the data.



Best Answer

"inventory" is a synax error. It is supposed to be capitalized.

This should be a working /testfor command:

/testfor THE_ELEMENT_KING {Inventory:[{id:"minecraft:diamond"}]}



Pictures about "testfor wont recognize what its supposed to"

testfor wont recognize what its supposed to - Crop woman touching cloth with inscription
testfor wont recognize what its supposed to - Person Holding Clear Drinking Glass
testfor wont recognize what its supposed to - Interior of modern office lounge zone with sofa and armchair with table near window next to TV on wall and neon signboard with text do what you love near door



How do I use the Testfor player command?

How to Enter the Command
  • Test if Players are within 10 blocks. In this example, we will test to see if there are any players within a 10 block radius with the following command: /testfor @a[r=10] ...
  • Test if Mooshrooms are within 50 blocks. ...
  • Test if Nearest Player is at Level 20 experience.


  • What happened to Testfor Minecraft?

    The /testfor command became obsolete in Minecraft 1.13, and has been replaced by the /execute command*. It will do the same as typing /testfor @e {SelectedItem:{id:"<item>"}} and then putting a comparator to the command block with the command, and then running the command which you wanna run.



    Comparator Testfor Problem fix




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: wewe yang, SHVETS production, RODNAE Productions, Max Vakhtbovych