Solved ConcurrentModificationException

Discussion in 'Spigot Plugin Development' started by patricianko, May 30, 2018.

  1. SOLVED
     
    #1 patricianko, May 30, 2018
    Last edited: May 30, 2018
  2. BananaPuncher714

    Supporter

    Your "h.removeLiner()" method probably removes the object from a list. You cannot remove it while iterating over it so I suggest you use the Iterator#remove() method to remove it instead.
     
  3. When your looping iver the holograms (h) you remove one inside the loop ypu can not do this. Cannot remove from a list your looping ovee
     
  4. What's line 75? I'm almost positive it's the crazy weird iterator/for loop you're using.
     
  5. 75 is
    Code (Text):
    String s = iterator.next();
     
  6. please leave your post so if another user has the same problem it here....
     
  7. I created a special arraylist where I wrote the data and created for loop again from the new array. It's works good.