How to do testfor with different maps

How to do testfor with different maps - Top view of creative world continents made of various nuts and assorted dried fruits on white background in light room

in my map players get given certain maps via command blocks. This works fine but when I try to mimic this with the testfor command, it doesnt work.

I use /give @p minecraft:filled_map 1 2 to spawn the specific map

However, when I do /testfor @p {Inventory:[{id:minecraft:filled_map 1 2}]} it just says that I didnt match the required data structure

Is this a mishap on my part or is there another way to do this? Appreciate all help!






Pictures about "How to do testfor with different maps"

How to do testfor with different maps - Measuring tape on empty white background
How to do testfor with different maps - Set of various supplies for traveling
How to do testfor with different maps - Top view layout of costume of traveler with notepad and knife placed near photo camera and lenses on surface near diary with map



How do you use the Testfor command in Minecraft?

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.

    How do you use the Testfor command in Minecraft Education Edition?

    You can test whether there is a certain block at a specific location in the game using the /testforblock command in Minecraft. TIP: Starting in Minecraft Java Edition (PC/Mac) 1.13, the /testforblock command was removed from the Java Edition version of the game.



    Minecraft Map Making Tutorials #2: Commands /testfor, /tellraw, /title \u0026 their Applications




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

    Images: Monstera, Ksenia Chernaya, Rachel Claire, Rachel Claire