Solved Array list help

Discussion in 'Plugin Development' started by mine-care, May 18, 2014.

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

    mine-care

    Hello, i have this code:
    Code:java
    1. for(int i = 0; i<a.size(); i++){
    2. if(!a.get(i).contains(this.getDescription().getVersion())){
    3. this.getServer().getConsoleSender().sendMessage(ChatColor.RED+a.get(i));
    4. }else{
    5. a.clear();
    6. }
    7. }
    8.  

    that refers to a array list of strings named "a",
    I want to see if ANY of the strings stored there contain the version (1.0) and if it does then print all strings of it. Else return, the code above checks for each string.
    How can i do that?

    Someone PLEASe i need a bit fast :S sorry for bumping

    Nvm Figured it out with a boolean :/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
Thread Status:
Not open for further replies.

Share This Page