Sueta

SimpleSort

1

Easy to use sorting system that only requires 1 variable containing the player's score

·Plugin

I had a hard time finding an easy way to sort the score of player's, so I made it myself.

This is supposed to be a basic outline for those also struggling to find a way of dealing with leaderboards.

Im not sure what addons are required, but most of the code should be vanilla skript except maybe the sounds and actionbar showing progress

What you need to do:
- Change {players::*} to a list variable containing a list of all your players

- Change {SCOREOFPLAYERVARIABLE::%loop-value%} to whatever score you'd like to sort. Example, {Kills::%loop-value%} if you wanted a highest kill leaderboard (You'll need to add the code for increasing this variable on kills though)

Known issues:
- If you have less than 10 players in the variable, it will not fully sort the numbers and will be stuck at however many players are contained the variable. (I'm not going to fix this as this is not an issue for me)

- If the score of the player is not set, it will be set to a random number between 0 and 1 - this is to prevent the issue above, where it will simply get stuck and refuse to work further.

Similar projects

Plugin →