How can I make a Money top?

Discussion in 'Plugin Development' started by javafan666, Dec 5, 2018.

  1. Offline

    javafan666

    Sry for my bad english, I'm not fluent.

    So, I need a money top system for my simple economy plugin, I'm currently learning bukkit dev and I don't know how I can do this. My economy plugin use the config.yml to save the values (money of the players).

    Ex config:
    Code:
    Money:
      javafan666: 2500
      playerexample: 100
    ...

    Please, help me! I would like a money top with 10 top most rich player's. Thanks!
     
  2. Online

    timtower Ninja on the waves Moderator

    @javafan666 Load the balances into a map of some sort.
    Loop over the map, find the highest one, add the name to the list, remove the name from the map.
    Repeat 9 more times.
     

Share This Page