Skip to content

Commit

Permalink
Add method that allows to save settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Nov 1, 2021
1 parent 31d93de commit 6cd1af2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/main/java/world/bentobox/biomes/BiomesAddon.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,6 @@ public void onDisable()
{
this.getLogger().info("Disabling biomes addon.");

if (this.settings != null)
{
new Config<>(this, Settings.class).saveConfigObject(this.settings);
}

if (this.addonManager != null)
{
this.addonManager.save();
Expand All @@ -235,6 +230,18 @@ public void onDisable()
}


/**
* Save settings.
*/
public void saveSettings()
{
if (this.settings != null)
{
new Config<>(this, Settings.class).saveConfigObject(this.settings);
}
}


/**
* This method loads addon configuration settings in memory.
*/
Expand Down

0 comments on commit 6cd1af2

Please sign in to comment.