Top 10

Discussion in 'Plugin Development' started by teunie75, Feb 1, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    teunie75

    Im trying to make a top 10 list which you can acces by a command, but I can't figure out how to do this.
    I want to show a player's name with a number next to it.
     
  2. Offline

    joatin37

    Why not use the chat.
    Code:
    Player[] otherplayers; //The other 10 players
    Player player;
     
    for (int i = 0; i < 10; i++){
    player.sendMessage(otherplayers[i].getName()+" - "+i);
    }
     
  3. Offline

    teunie75

    How can I get that ten names from the config then?
     
  4. Offline

    ritonda66

    Code:
    int i = getConfig().getInt("Somerandompath."+otherplayers[i].getName());
    Im not really sure, I wrote that from my head.
     
  5. Offline

    teunie75

    I don't get it (maybe I sound dumb now xD)
    Im trying to get the highest number with names from a file:
    For example
    player1: 22
    player2: 19
    player3: 25
    player4: 15
    player5: 10
    player6: 26
    player7: 14
    player8: 26
    player9: 30
    player10: 20
    player11: 2
    ... and so on.
    I want to display this in order from low to high.
     
Thread Status:
Not open for further replies.

Share This Page