0

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.

1
  • @MrLemon I removed the comment and added it as an answer.
    – GiantTree
    Commented Jun 29, 2015 at 9:02

1 Answer 1

3

Your whole command is invalid.
The correct format would be

/scoreboard players add <player> <objective> <count> [dataTag]

so your command would then become:

/scoreboard players add @a[x=-506,y=56,z=-1176,r=1] Score 1 {Inventory:[{id:"minecraft:iron_ingot"}]}

Always remember: NBT data tags always come last in a command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .