Minecraft Windows 10 edition testfor command

minecraft-bedrock-editionminecraft-commands

In the Windows 10 edition, I'm trying to create a capture the flag (banner) map which detects if the flag has been dropped and replaces it back at that team's base but I can't manage to set up the command. So far I have tried:

/testfor @e[type=Item] {Item:{id:minecraft:banner}}

to receive:

Syntax Error: unexpected "{" at "ype=Item] >>{<<Item{in:m"

I know some commands are slightly different between Bedrock and Java, so I could have the wrong syntax. Also, it would be great if it could detect the colour as well. Please, could someone enlighten me?

Note: It is not the same as the question: Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition? because I want to test for a block, not setting it so you are only able to place it on specific blocks.

It is also not a duplicate of Can you tell if a specific item is dropped? What about its name? as this question was written first, therefore they have asked a duplicate of my answer!

Best Answer

i resolved this issue by downloading somebody elses map and looking at the code they had set up

for anyone who might need this

/testfor @e[type=item,name="blue banner"]

This will only work if the player is playing on English. It is not case-sensitive.