Why do three of these commands not work?
//ads -- adsterra.com -- native banner
?>
I'm creating a custom data pack. Basically I want commands to run when the ball is within 1 block of the red marker.
These first 5 commands work great!
execute as @e[type=marker,name=Red] at @s if entity @e[type=armor_stand,tag=Ball,distance=..1] run particle minecraft:totem_of_undying ~ ~2 ~ 1.5 1 1.5 0 250 force
execute as @e[type=marker,name=Red] at @s if entity @e[type=armor_stand,tag=Ball,distance=..1] run playsound entity.firework_rocket.twinkle_far ambient @a ~ ~ ~ 30000 1
execute as @e[type=marker,name=Red] at @s if entity @e[type=armor_stand,tag=Ball,distance=..1] run tellraw @a {"text":"Blue DUNKED on Red!","color":"aqua","bold":true}
execute as @e[type=marker,name=Red] at @s if entity @e[type=armor_stand,tag=Ball,distance=..1] run scoreboard players add Blue Score 1
execute as @e[type=marker,name=Red] at @s if entity @e[type=armor_stand,tag=Ball,distance=..1] run tp @e[type=armor_stand,tag=Ball] -194 3 87 facing -194 4 87
But these last 3 don't work at all. What is going on?
execute as @e[type=marker,name=Red] at @s if entity @e[type=armor_stand,tag=Ball,distance=..1] run spreadplayers -193.58 75.61 3 3 true @p[team=Red]
execute as @e[type=marker,name=Red] at @s if entity @e[type=armor_stand,tag=Ball,distance=..1] run effect give @p[team=Red] minecraft:slowness 3 255 true
execute as @e[type=marker,name=Red] at @s if entity @e[type=armor_stand,tag=Ball,distance=..1] run effect give @p[team=Red] minecraft:jump_boost 15 127 true
Best Answer
One of the things that doesn't work that is common to all three of the failing commands you provided is the target selector @p[team=Red]
. This means that only the nearest player is selected that is on the team, not all the players.
@a
will ensure that all players matching the filters are selected.
Pictures about "Why do three of these commands not work?"
Why cmd commands are not working?
Fix 1.Restarting computer can sometimes help fix many minor computer issues. You can click Start -> Power -> Restart to reboot your Windows 10 computer. Then you can press Windows + R, type cmd, and press Enter (press Ctrl + Shift + Enter to open elevated Command Prompt) to see if you can open Command Prompt now.Why is command not found?
The error \u201cCommand not found\u201d means that the command isn't in your search path. When you get the error \u201cCommand not found,\u201d it means that the computer searched everywhere it knew to look and couldn't find a program by that name. You can control where the computer looks for commands, however.How do I Run multiple commands in one command?
You can use the special characters listed in the following table to pass multiple commands.How do I fix Linux command not found?
5 ways to fix "Command not found" errorsWhy Sudo Is The Best Command in Minecraft
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Christina Morillo, Edmond Dantès, Ketut Subiyanto, Ketut Subiyanto