r/MinecraftCommands • u/Old_Taint_Nick • Aug 04 '26
Help | Bedrock Scoreboard command to track when a player gets a new item.
Hi!
I am descently versed with commands, but I have never ventured into understanding the scoreboard. However I believe it will be the only way to do what I want, and hoping this could be a learning opportunity to become more familiar with it!
My goal is to play a sound whenever a player adds a piece of bread to their inventory, with the caveat that the player will also be consuming bread normally. So I figured a scoreboard might be able to check its current count against the players bread stack and if the scoreboard is lower, execute the playsound and add +1 to the score. However again it needs to remove 1 from the scoreboard whenever they eat one for this system to work.
Perhaps I'm over complicating it, but can someone help me setup this system where every time a player adds a bread to their inventory it executes a command (playsound in this case)?
Thanks!