diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/configuration/file/YamlConfiguration.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java index 237018e3..a15f69b7 100644 --- a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java +++ b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java @@ -148,6 +148,7 @@ public class YamlConfiguration extends FileConfiguration { String[] lines = input.split("\r?\n", -1); StringBuilder result = new StringBuilder(); boolean readingHeader = true; + boolean foundHeader = false; for (int i = 0; (i < lines.length) && (readingHeader); i++) { String line = lines[i]; @@ -160,9 +161,11 @@ public class YamlConfiguration extends FileConfiguration { if (line.length() > COMMENT_PREFIX.length()) { result.append(line.substring(COMMENT_PREFIX.length())); } - } else if (line.length() == 0) { + + foundHeader = true; + } else if ((foundHeader) && (line.length() == 0)) { result.append("\n"); - } else { + } else if (foundHeader) { readingHeader = false; } } |