Fix empty config values from old config

This commit is contained in:
Rsl1122 2019-01-17 11:22:51 +02:00
parent 1273f26a64
commit c011bb6be0
2 changed files with 5 additions and 2 deletions
Plan/common/src
main/java/com/djrapitops/plan/system/settings/config
test/resources/config

View File

@ -23,6 +23,8 @@
*/
package com.djrapitops.plan.system.settings.config;
import com.djrapitops.plugin.utilities.Verify;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
@ -294,7 +296,7 @@ public class ConfigNode {
}
// Override value conditionally
if (value == null && from.value != null) {
if (Verify.isEmpty(value) && from.value != null) {
value = from.value;
}

View File

@ -76,7 +76,8 @@ Analysis:
DestinationFolder: 'Analysis Results'
Data:
# How many minutes player has to stay still to be considered AFK
AFKThresholdMinutes: 3
# TEST: THIS NODE HAS BEEN INTENTIONALLY LEFT EMPTY TO TEST DEFAULT COPYING
AFKThresholdMinutes:
Commands:
LogUnknownCommands: false
CombineCommandAliases: true