Fix defaults overriding config

This commit is contained in:
games647
2018-04-05 18:42:50 +02:00
parent cdf1988f2f
commit 791df26702
3 changed files with 5 additions and 5 deletions
@@ -115,12 +115,12 @@ public class FastLoginCore<P extends C, C, T extends PlatformPlugin<C>> {
Configuration config;
try (Reader reader = Files.newBufferedReader(file)) {
config = configProvider.load(reader);
config = configProvider.load(reader, defaults);
}
//explicitly add keys here, because Configuration.getKeys doesn't return the keys from the default configuration
for (String key : defaults.getKeys()) {
config.set(key, defaults.get(key));
config.set(key, config.get(key));
}
return config;
@@ -84,8 +84,8 @@ public abstract class ForceLoginManagement<P extends C, C, L extends LoginSessio
public boolean forceLogin(P player) {
core.getPlugin().getLog().info("Logging player {} in", getName(player));
boolean success = core.getAuthPluginHook().forceLogin(player);
boolean success = core.getAuthPluginHook().forceLogin(player);
if (success) {
core.sendLocaleMessage("auto-login", player);
}