How can I increase a scoreboard objective if player is at specific coords and has a specific item in his inventory?
//ads -- adsterra.com -- native banner
?>
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.
Pictures about "How can I increase a scoreboard objective if player is at specific coords and has a specific item in his inventory?"



How do you add a scoreboard to an objective?
Scoreboard CommandHow do you make a custom scoreboard in Minecraft?
The other target selectors are \u201c@a\u201d for all players, \u201c@r\u201d for a random player, and \u201c@e\u201d will target all entities. Entities include everything that isn't a block, like monsters, snowballs, animals, and arrows. The command should execute successfully and give you a new block.Minecraft Scoreboard Operation Tutorial [1.16/1.17/1.18/1.19] How to Count Entities
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Karolina Grabowska, Liza Summer, Ketut Subiyanto, Karolina Grabowska
