Create a scoreboard objective called "Test"
/scoreboard objectives add Test dummy
Set it to display sidebar
/scoreboard objectives setdisplay sidebar Test
Set score of fake player Notch for Test to 1
/scoreboard players set Notch Test 1
Set your score for Test to 2
/scoreboard players set @p Test 2
Perform this command:
/scoreboard players operation Notch Test > @p Test
This will set Notch's score of Test to 2, BUT the question is why:
Because Notch's score of Test is smaller than yours so it is incorrect which should NOT cause to set Notch's score to your score.
Probably they just messed up "<" and ">"
Comments 8
Oh okay after looking it up I understand it now, it is just a little bit irritating when you don't get it explained 😉
I do not understand the use of this command anyway.
How can I test if a score is greater or less than another score now?
I think EscoreFairplay is a little bit right, it is really hard to understand everything when MOJANG doesn't post a COMPLETE changelog. I know you post some stuff on twitter and then other people add stuff on reddit, but it is really hard to get everything 😉
So to your question:
When you have
/scoreboard players operation Player1 Object1 </> Player2 Object2
So when you have < it sets the score for Player1 for Objective1 to the lower score
and when you have > it sets the score for Player1 for Objective1 to the higher score
The operation >< switches both
if (operation.equals("=")) score1.setScore(score2.getScore());
if (operation.equals("<")) score1.setScore(Math.min(score1.getScore(), score2.getScore()));
if (operation.equals(">")) score1.setScore(Math.max(score1.getScore(), score2.getScore()));