فهرست منبع

Remove empty lines from FlatFile - the plugin will not enable if these are present.

GJ 11 سال پیش
والد
کامیت
446b6c107b
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java

+ 5 - 0
src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java

@@ -577,6 +577,11 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
                     HashSet<String> players = new HashSet<String>();
 
                     while ((line = in.readLine()) != null) {
+                        // Remove empty lines from the file
+                        if (line.isEmpty()) {
+                            continue;
+                        }
+
                         // Length checks depend on last character being ':'
                         if (line.charAt(line.length() - 1) != ':') {
                             line = line + ":";