I\'ve been programming a Bukkit plugin for a while now, and this one issue has me stumped. I\'m trying to read a line from a file using a Scanner, and add everything on the line
in.nextLine() you are calling this twice but checking hasNextLine() only once.
in.nextLine()
hasNextLine()
In second call you might have line available.
players.add(in.nextLine().split(": ")[0]);
How to fix?
String tempLine = in.nextLine();
Then do operations on this string