Skip to content

Commit

Permalink
Force the removal of previous settings instead of updating via ref.
Browse files Browse the repository at this point in the history
  • Loading branch information
DxsSucuk committed Jan 5, 2024
1 parent 0f54c0f commit d395af4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/de/presti/ree6/main/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,16 @@ public static void main(String[] args) {
getInstance().setCommandManager(new CommandManager());

Setting prefixSetting = SettingsManager.getDefault("chatprefix");
SettingsManager.getSettings().remove(prefixSetting);

prefixSetting.setValue(BotConfig.getDefaultPrefix());
SettingsManager.getSettings().add(prefixSetting);

Setting languageSetting = SettingsManager.getDefault("configuration_language");
SettingsManager.getSettings().remove(languageSetting);

languageSetting.setValue(BotConfig.getDefaultLanguage());
SettingsManager.getSettings().add(languageSetting);
} catch (Exception exception) {
log.error("Shutting down, because of an critical error!", exception);
System.exit(0);
Expand Down

0 comments on commit d395af4

Please sign in to comment.