again it is I and how can I stop a command from running if a test is successful for example to test if a player has cobblestone in their inventory and then if it is successful it will stop a command from running until the test is unsuccessful. Please help.
1
I think you might be looking for "/execute unless", which is the opposite of "/execute if". With "/execute if", the command will only run if the test is true. With "/execute unless", the command will only run if the test is false.
You can read more about it here: https://www.planetminecraft.com/blog/function-data-packs-for-dummies-8-check-a-lot-of-things-but-only-once/
Hope this helps! :)
execute unless entity @s[nbt={Inventory:[{"id":"minecraft:cobblestone"}]}] run say No cobblestone here! :)You can read more about it here: https://www.planetminecraft.com/blog/function-data-packs-for-dummies-8-check-a-lot-of-things-but-only-once/
Hope this helps! :)
