I don't know how to put those two conditions together into one command. I tried
/scoreboard players add @a{Inventory:[{id:"minecraft:iron_ingot"}]} [x=-506,y=56,z=-1176,r=1] Score 1
but it doesn't work, and I have trouble with brackets.
minecraft-commandsminecraft-java-edition
I don't know how to put those two conditions together into one command. I tried
/scoreboard players add @a{Inventory:[{id:"minecraft:iron_ingot"}]} [x=-506,y=56,z=-1176,r=1] Score 1
but it doesn't work, and I have trouble with brackets.
Best Answer
Your whole command is invalid.
The correct format would be
so your command would then become:
Always remember: NBT data tags always come last in a command.