Why do three of these commands not work?

Why do three of these commands not work? - Woman Discussing With Her Colleagues

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 do three of these commands not work? - A Bearded Man in Coffee Shop Talking to a Woman
Why do three of these commands not work? - Photo of Family Smiling While Holding Signage
Why do three of these commands not work? - Photo of Family Smiling While Standing Near Signage



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.
  • & [...] command1 & command2. Use to separate multiple commands on one command line. ...
  • && [...] command1 && command2. ...
  • || [...] command1 || command2. ...
  • ( ) [...] (command1 & command2) ...
  • ; or , command1 parameter1;parameter2.


  • How do I fix Linux command not found?

    5 ways to fix "Command not found" errors
  • Include the path. Image. ...
  • Add a new path. Alternately, you can add a new directory to your PATH. ...
  • Copy a file to an existing path location. ...
  • Tell Bash where to look. ...
  • Install a package.




  • Why 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