For various purposes, I need a way to check scoreboard objectives rather than just checking a player's scores. Is there a command I can run that can find the largest score in a scoreboard and who has it? What about the smallest? What about the 8th largest? Is there a way I can get a list of all "players" with a score of 12 in a specific objective?

This functionality feels like it should exist in minecraft; you can display leaderboards on the sidebar, for example, but I can't find a way to access them with commands. Are any of these things possible? If so, how?

Edits for clarity: I need to be able to target offline players, not just a group of online players with various scores. That is, I want to create the same functionality as the sidebar leaderboard but accessible via commands. The sidebar leaderboard displays who has the highest score in an objective, even if it's a dummy player or armorstand or something, but it only lists the top 5. Additionally, and partially related, I want to know of it's possible to create a list of all players, online, offline, or dummy, with a score of 5, or any specific number.

This is a similar question, however, my question wants to be able to get the score of offline players or players that don't even exist. The solutions that exist target @a or @e and systematically check if their scores are higher. @a and @e don't target offline players, however, and can't identify the true highest score the same way a scorebore sidebar leaderboard can.

  • There is no native way to check the biggest or smallest, it needs a workaround. You can get the list of players with a score of 12, but how would you use it? If you do say @a[scores={something=12}] it will show on chat all the players. Im having a hard time understading what answer you want. Also if you mean fake scores, im almost certain you can't genericly target them
    – BunnyMerz
    Nov 23 at 1:03
  • 3
    Possible duplicate of How to get player with highest, second highest, etc. score?
    – pppery
    Nov 23 at 3:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.