mojira.dev
MC-57833

Scoreboard operation "<" and ">" doesn't work correct

    1. Create a scoreboard objective called "Test"

      /scoreboard objectives add Test dummy
    2. Set it to display sidebar

      /scoreboard objectives setdisplay sidebar Test
    3. Set score of fake player Notch for Test to 1

      /scoreboard players set Notch Test 1
    4. Set your score for Test to 2

      /scoreboard players set @p Test 2
    5. 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

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()));

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?

This is not a discussion board or user helpdesk!

How come that mojang staff became so rude in recent years.. be happy guys. Life is great!

he's right trough, bug tracker, nothin else

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

Closed due to the fact that people kept commenting or updating their comments on the issue after it was resolved. It's really distracting to get several mails per day for no good reason.

marcono1234

michael

Unconfirmed

/scoreboard-operation

Minecraft 14w25b

Retrieved