Skip to content

Commit

Permalink
Load Settings file before anything else.
Browse files Browse the repository at this point in the history
  • Loading branch information
Staartvin committed Feb 3, 2021
1 parent 25b02c8 commit 7b579e2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/me/armar/plugins/autorank/Autorank.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,18 @@ public void onEnable() {

// Create new configs
this.getDefaultBehaviorConfig().loadConfig();
if (!this.getPathsConfig().loadConfig()) {
this.getWarningManager().registerWarning("Paths.yml file could not be loaded! Please check your syntax.",
WarningManager.HIGH_PRIORITY_WARNING);
}

// Load the Settings config before any other config
if (!this.getSettingsConfig().loadConfig()) {
this.getWarningManager().registerWarning("Settings.yml file could not be loaded! Please check your syntax.",
WarningManager.HIGH_PRIORITY_WARNING);
}

if (!this.getPathsConfig().loadConfig()) {
this.getWarningManager().registerWarning("Paths.yml file could not be loaded! Please check your syntax.",
WarningManager.HIGH_PRIORITY_WARNING);
}

// Check if there are updates for the Settings.yml file.
if (this.getSettingsConfig().updateConfigWithNewOptions()) {
getLogger().info("The settings.yml is up-to-date");
Expand Down

0 comments on commit 7b579e2

Please sign in to comment.