Skip to content

Commit

Permalink
fix: apiProvider being initialized after saveConfig
Browse files Browse the repository at this point in the history
Resolves #60
  • Loading branch information
Cubxity committed Sep 25, 2022
1 parent ef451c6 commit 229769b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -48,14 +48,14 @@ abstract class AbstractUnifiedMetricsPlugin : UnifiedMetricsPlugin {
Files.createDirectories(bootstrap.configDirectory)

_config = loadConfig()
_apiProvider = UnifiedMetricsApiProvider(this)

try {
saveConfig()
} catch (exception: Exception) {
apiProvider.logger.severe("An error occurred whilst saving plugin config file", exception)
}

_apiProvider = UnifiedMetricsApiProvider(this)
UnifiedMetricsProvider.register(apiProvider)
registerPlatformService(apiProvider)

Expand Down

0 comments on commit 229769b

Please sign in to comment.