hi, In my plugin, I keep track of a player's kill to death ratio. I would like to add a command that will display the players with the top 5 kill death ratios in order. the only problem is, I need to go and get the kills and deaths from each player, but for every player and comapre them. any idea how I would do this? here is what my config looks like: Code: Players: 1stPlayer: kills: 3 deaths: 3 2ndPlayer kills: 2 deaths: 6 3rdPlayer kills: 5 deaths: 2
MrTang thank you, but unfortunately I am not quite good enough to figure out what his code does, because I have never used anything like it before, can you maybe explain what he did?
Create the ValueComparator class Loop through the config and put the name + KD in a HashMap In your command, sort the Map. Loop through the Entries for the map and send the top 10 message.