1
Function Command Help.
Is it possible to make a function command conditional so it will not move on to the next command if the previous command was not executable?
I am trying to make this function work but every time you execute it the commands it will give you money even if you do not have any iron.
Any Ideas? Thanks for that help.
I am trying to make this function work but every time you execute it the commands it will give you money even if you do not have any iron.
testfor @s[r=5] {Inventory:[{id:"minecraft:iron ingot",Count:1b}]}
clear @s[r=5] iron_ingot 0 1
scoreboard players add @s Money 10
tellraw @s ["",{"text":"$10","bold":true,"color":"dark_green"},{"text":" ","bold":true,"color":"dark_red"},{"text":"Has Been Added To Your Account.","color":"green"}]
Any Ideas? Thanks for that help.
Create an account or sign in to comment.
6
info Note: You're viewing a single reply. View all replies
1
A function can also be linked up to a chain of command blocks that are conditional. Setting a redstone block at the beginning of a command line could do that, but it would have to be in a constantly loaded area such as spawn chunks.