getting next string in stringlist

Discussion in 'Plugin Development' started by mokilppp, May 9, 2015.

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

    mokilppp

    id like to get the next string in a sting list, how do i go about doing so? id like at the end of the list and i do the watever thing to go to the next does it go to the top of the list?
     
  2. Offline

    ColonelHedgehog

    What?

    Have you tried a for loop?
     
  3. Offline

    mokilppp

    why would i use a for loop? i want to ge tone from the list then do a method and get another from the list but not the same as the previous

    public void arenacycle() {
    List<String> arenas = haha.getStringList("Arenas.");
    arenas.//need to get next in list each time in here
    }
     
  4. Offline

    xMrPoi

    use the indexOf method to see where in the list that string you're using is. Increment that index by one and check to see if it's greater than or equal to the list size. If it is, go to the beginning again. If it's not, just use that index in the list.
     
  5. Offline

    Gater12

Thread Status:
Not open for further replies.

Share This Page