Solved Sorting the Tab-List

Discussion in 'Spigot Plugin Development' started by tr7zw, Dec 11, 2014.

  1. I am looking for a way to sort the Player in the Tab-List.
    But if I remember correctly, the player list cant be sorted directly. I was thinking about sending the client the packets to remove every Player from the tab list, and then send them in the right order. But I think that would totaly spam the clients with packets and the list would flicker like crazy. Is there any other way to sort the tab list without constantly spamming add and remove packets?
    tr7zw
     
  2. I think it would be possible to set the scores to rearrange. That's how it is on SIDEBAR scoreboards.
     
    • Like Like x 1
  3. By setting a score and set the display to the Tablist? That could work... I will test a little bit with scoreboards...

    Edit:
    http://puu.sh/ds8LQ/81668670c8.jpg
    No, Minecraft doesn't sort the list by the score :/.
     
    #3 tr7zw, Dec 12, 2014
    Last edited: Dec 12, 2014
  4. gigosaurus

    Supporter

    The tab list is sorted by scoreboard groups, and then by character value (0-9A-Z_a-z). I don't quite know how the groups themselves are ordered though, but if you could work that out then just assigning each player to their own group could work if done correctly.
     
    #4 gigosaurus, Dec 13, 2014
    Last edited: Dec 13, 2014
    • Useful Useful x 4
  5. http://puu.sh/dsOEQ/06ff3cf281.png
    That works.
    tr8zw is in a team named "player1" and tr7zw in a team named "player2". Thanks gigosaurus. That will work way smoother than spamming packets ^_^.
     
    • Like Like x 1
    • Useful Useful x 1
  6. Can you help me? I am getting trouble with that
     
  7. The scoreboard option is no longer working :/ tested on 1.12.2
     
  8. The last post was in 2016...
     
    #8 Mee8a, Jan 28, 2018
    Last edited: Jan 28, 2018
    • Agree Agree x 2
  9. Yep but this post is still quoted to explain peoples how to sort a tablist, so they have to know that it doesn't work anymore....
     
    • Agree Agree x 2
  10. If you have problems with sorting the scoreboard, I'd advise creating a new thread because reviving one from about 2 years ago probably isn't the smartest.
     
  11. You just have to use the tags.

    Example:
    §a§rSonicboum
    §b§rMcJeff
    §c§rMee
     
    • Like Like x 1
    • Useful Useful x 1
  12. Changing a player's tablist name doesn't do anything on sorting. The tablist sorts using the player's name
     
  13. Use the prefix of the teams if
     
  14. You mean using the teams's names? doesn't works
     
  15. First of all this post is from 2014, how time flies :eek:.
    Also as far as I can tell we are still sorting tab using the team names.
    [​IMG]
    tr7zw is in team "1T" and tr4zw in team "2T", overwriting that 4 should come before 7. This works in 1.12-1.8.