mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-10-31 07:50:09 +01:00
[#874] Fixed config read case when key is empty
This commit is contained in:
parent
d9a994c8e8
commit
e5138d8ec7
@ -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));
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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("#")) {
|
||||
|
Loading…
Reference in New Issue
Block a user