/goop scoreboard top <objective source> <objective target> <n> [Max Sweep]
They are assigned their rank in the target objective.
The best player will have a score of 1
The next best player, the second place, will have a score of 2
The third best will have a score of 3, and so on.
The name of the scoreboard objective that you want to get the top players from.
The name of the scoreboard objective that will store the results.
Not required to already exist. If it already exists, it will be deleted and a new one of the same name created.
Maximum name length of 16 characters (vanilla limitation)
The max amount of entries that will be copied.
If the source objective doesn't have enough players in it, all the players will be assigned their rank in the target objective.
The max amount of entries that will be sorted through.
If missing, only online player names will be examined.
Set to a comma list of entity types (like SKELETON) to sort through loaded entities of these types.
For some reason, bukkit only lets the code retrieve ALL entries ever existed of all scoreboards (and then decides it is funny to give them all a score of 0) such that sorting through them all (to find the <n> entries with most value) freezes large/old servers.
Choosing <n> as 3 will leave out all but the top 3 players.
Thus, I guess you'd need to provide an unreasonable number like 32767 to be sure to rank all players if you truly wish to.
In case of a tie, all the players who tie will be included (because it would be unfair otherwise I guess), and they will count as only one place.
Suppose there is a triple tie for the first place, with <n> is 2 and at least four players. Three players will have a score of 1, and one player will have a score of 2.
Players with a score of 0 will be ignored.
Note that those who tie have the same place, ending with six players in the output objective though <n> was set to 4.
command{c="goop scoreboard top potato top_potato 3"} @Self ~onSpawn
Will give the top 3 players in the potato objective a rank in a new top_potato objective. If top_potato already exists, it will delete the old.
command{c="goop scoreboard top killStreak topKStrk 3000"} @Self ~onSpawn
Will rank every player in the killStreak objective in a new objective "topKStrk". The rank will be in ascending order from most to least score. If topKStrk already exists, it will delete the old.
Ok so why is this so hard to do like seriously, this is such a basic scoreboard function and there didn't seem to be a simple way of doing it... until now BRUH.
Literally search all the youtube videos on how to get the top 3 players of a scoreboard. People making computers out of minecraft but the simplest machine to do this is impractical af still.