[#874] Fixed config read case when key is empty

This commit is contained in:
Rsl1122 2019-01-08 17:28:20 +02:00
parent d9a994c8e8
commit e5138d8ec7
3 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ public class PlanBungee extends BungeePlugin implements PlanPlugin {
@Override
public void onDisable() {
system.disable();
if (system != null) system.disable();
logger.info(locale.getString(PluginLang.DISABLED));
}

View File

@ -78,7 +78,7 @@ public class Config extends ConfigNode {
public void read() throws IOException {
try (ConfigReader reader = new ConfigReader(Files.newInputStream(configFilePath))) {
copyMissing(reader.read());
copyAll(reader.read());
}
}

View File

@ -108,7 +108,7 @@ public class ConfigReader implements Closeable {
}
private void handleLine(String line, String trimmed) {
if (trimmed.isEmpty()) {
if (trimmed.isEmpty() || trimmed.startsWith(":")) {
// Add an empty row comment in case user wants spacers
handleCommentLine(" ");
} else if (trimmed.startsWith("#")) {