Skip to content

Commit

Permalink
Hotfix: load configs properly. Bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
RezzedUp committed Mar 14, 2022
1 parent bcc855b commit e5666f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -6,7 +6,7 @@

<groupId>com.rezzedup</groupId>
<artifactId>discordsrv-staff-chat</artifactId>
<version>1.4.3</version>
<version>1.4.4</version>

<name>DiscordSRV-Staff-Chat</name>
<inceptionYear>2017</inceptionYear>
Expand Down
Expand Up @@ -92,7 +92,7 @@ public void onEnable()
this.config = new StaffChatConfig(this);
this.messages = new MessagesConfig(this);

upgradeLegacyConfig();
loadConfigurationFiles();

this.data = new Data(this);
this.updater = new Updater(this);
Expand Down Expand Up @@ -238,6 +238,16 @@ public void submitMessageFromDiscord(User author, Message message)
//
//

private void loadConfigurationFiles()
{
// Explicitly load configs
config().reload();
messages().reload();

// Upgrade & migrate legacy config if it exists
upgradeLegacyConfig();
}

private void upgradeLegacyConfig(YamlDataFile file, List<YamlValue<?>> values)
{
file.migrateValues(values, getConfig());
Expand Down

0 comments on commit e5666f7

Please sign in to comment.