Skip to content

Commit

Permalink
Remove duplicate reload method
Browse files Browse the repository at this point in the history
Signed-off-by: DevDrizzy <[email protected]>
  • Loading branch information
DevDrizzy committed Sep 12, 2023
1 parent 545a1b5 commit 982e055
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/main/java/xyz/refinedev/api/storage/YamlStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,22 +128,6 @@ public void readConfig() {
this.saveConfig();
}

/**
* Reload this config
*/
public void reload() {
try {
this.config.options().useComments(true);
this.config.load();
} catch (IOException ex) {
LOGGER.error("[Storage] Could not load " + name + ".yml, please correct your syntax errors!");
LOGGER.error("[Storage] Error: " + ex.getMessage());
}

this.readConfig();
this.writeConfig();
}

/**
* Write our config values to the config
*/
Expand All @@ -161,6 +145,9 @@ public void writeConfig() {
this.saveConfig();
}

/**
* Reload this config
*/
public void reloadConfig() {
try {
this.config.load();
Expand Down

0 comments on commit 982e055

Please sign in to comment.