Can run command for only one if score statement



  • I am trying to make a voting system for difficulties in my Minecraft world. I have set up the command blocks that add the score for a fake player named #VoterDirector for each difficulty. To test if the voting works, I have set up a basic command that runs execute if score #VoterDirector Easy > #VoterDirector Normal run tellraw @a {"text":"easy wins"} The command block works successfully, but I want it to check if the Easy score is greater than all of the scores. This is where I am stuck. Adding another if score statement does not work. I have looked everywhere for a tutorial, but all of them were either outdated or Bedrock.



  • Adding another if score statement does not work.

    I think it does work:

    execute if score #VoterDirector Easy > #VoterDirector Normal if score #VoterDirector Easy > #VoterDirector Hard run tellraw @a {"text":"easy wins"}
    execute if score #VoterDirector Normal > #VoterDirector Easy if score #VoterDirector Normal > #VoterDirector Hard run tellraw @a {"text":"normal wins"}
    execute if score #VoterDirector Hard > #VoterDirector Easy if score #VoterDirector Hard > #VoterDirector Normal run tellraw @a {"text":"hard wins"}
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2