Top 5 Highest Kills || ASAP PLZ!

Discussion in 'Plugin Development' started by WingedMLGPro, Mar 30, 2015.

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


    Hey Everyone,
    I am trying to make a Top 5 kills command where it gets the top 5 highest ints in the
    config file i have created. But i dont know how to do this!
    Plz help me.

    here is my Events Class for the stats:

    here is my Command Class:

    Thanks Everyone!

  2. Offline


    You add all the Integers to an list and get the top 5 values.
    Code (open)
    int x = 5;
    //Put all integers into a list
    List<Integer> list;
    //Sort the list
    //Get the 5 Top values from the list.
    List<Integer> top5 =new ArrayList<Integer>(list.subList(list.size()-x, list.size()));
    Fruitninja567 likes this.
Thread Status:
Not open for further replies.

Share This Page