While the "execute" command contains many helpful conditions when making maps/datapacks, the condition
"else" should be added to make it so players can easily run a command if a certain criteria isn't met.
An example of this would be
"/execute as @e[tag=player1,nbt={Scores={Hello=1}] at @s if block ~ ~-1 ~ emerald_block run
say Hello World! else run say there is no emerald block"
the else condition can be used with all the other conditions in the game, but only a max of 5 will be allowed per command.
Ie. execute if block ~ ~ ~ stone run say hi else : if
run
store
positioned
unless
etc...
Please sign in to leave a comment.
2 Comments