IOException ioEx = null;
int unsuccessful = 0;
final StringBuilder invalid = new StringBuilder();
Version varVersion = Skript.getVersion(); // will be set later
final Version v2_0_beta3 = new Version(2, 0, "beta 3");
boolean update2_0_beta3 = false;
final Version v2_1 = new Version(2, 1);
boolean update2_1 = false;
BufferedReader r = null;
try {
r = new BufferedReader(new InputStreamReader(new FileInputStream(file), UTF_8));
String line = null;
int lineNum = 0;
while ((line = r.readLine()) != null) {
lineNum++;
line = line.trim();
if (line.isEmpty() || line.startsWith("#")) {
if (line.startsWith("# version:")) {
try {
varVersion = new Version("" + line.substring("# version:".length()).trim());
update2_0_beta3 = varVersion.isSmallerThan(v2_0_beta3);
update2_1 = varVersion.isSmallerThan(v2_1);
} catch (final IllegalArgumentException e) {}
}
continue;