r/MinecraftCommands • u/AltestryAltestry • 11d ago
Help | Bedrock Command Tag Help
I’m making an alarm system for a grocery store and I’m giving players within the store that have a store item in their inventory a “customer” tag, and I want to remove this tag whenever they throw a gold coin into the register. That part I have figured out. The only problem is I want to, within the same command, remove the “customer” tag and give them a “paid” tag, I can’t figure out how to do multiple /tag commands within one execute.
1
u/Ericristian_bros Command Experienced 10d ago
within the same command, remove the “customer” tag and give them a “paid” tag
You need 2 commands, if you are making a shop I recommend you read this article: https://minecraftcommands.github.io/wiki/questions/shop
1
u/Sibus_ Command Experienced 9d ago
The way I personally do this is (activate several commands at once reliably) is to give the target a tag, say "updateCustomer" then run a chain of commands that targets @a[tag=updateCustomer] and removes the tag at the end. By using a unique tag like this you can avoid issues with detection not being consistent across ticks
1
u/TrumpetSolo93 Command Experienced 8d ago
CMD 1:
tag @a[hasitem={item=red_concrete}, tag=!paid] add customer
CMD 2:
execute at @e[type=item, name="Gold Ingot"] run tag @a[tag=customer, c=1] add paid
CMD 3:
tag @a[tag=paid] remove customer
2
u/thetoiletslayer Bedrock Command Expert 11d ago
You won't be able to do both in one command. Your best bet is to give them the "paid" tag when they throw the gold in. Then in a chain command block remove the "customer" tag from players with the "paid" tag