Minecraft Wiki
Advertisement

The three scoreboard operators, <, >, and = do NOT check to see if one score is <, >, or = to another; they actually change the value of the target score.

"=" causes the target score to become equal to the operating score. (This can be used like the "scoreboard players set" command when the value to be set to is not constant but is the value of another score.) "<" causes the target score to become equal to the operating score only if the target score is greater than the operating score. ">" causes the target score to become equal to the operating score only if the target score is less than the operating score.

Example: MaxHealth is the operating score. If the Health score (the target score) rises above the MaxHealth score, the command "scoreboard players operation @a[selector stuff] Health < @a[selector stuff] MaxHealth" sets Health equal to MaxHealth, preventing Health from rising above MaxHealth but allowing it to maintain a lower value. 73.50.190.237 23:28, 19 June 2014 (UTC)

Advertisement