#927 Fix Settings initialization and failing tests
This commit is contained in:
@@ -41,6 +41,7 @@ public class Settings extends SettingsManager {
|
||||
List<PropertyEntry> knownProperties) {
|
||||
super(resource, migrationService, knownProperties);
|
||||
this.pluginFolder = pluginFolder;
|
||||
loadSettingsFromFiles();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,19 +80,18 @@ public class Settings extends SettingsManager {
|
||||
return welcomeMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void validateAndLoadOptions() {
|
||||
if (migrationService.checkAndMigrate(resource, knownProperties)) {
|
||||
ConsoleLogger.info("Merged new config options");
|
||||
ConsoleLogger.info("Please check your config.yml file for new settings!");
|
||||
save();
|
||||
}
|
||||
|
||||
private void loadSettingsFromFiles() {
|
||||
messagesFile = buildMessagesFile();
|
||||
welcomeMessage = readWelcomeMessage();
|
||||
emailMessage = readEmailMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
super.reload();
|
||||
loadSettingsFromFiles();
|
||||
}
|
||||
|
||||
private File buildMessagesFile() {
|
||||
String languageCode = getProperty(PluginSettings.MESSAGES_LANGUAGE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user