Makes sure to copy the default config

This commit is contained in:
Kristian Knarvik 2022-08-08 18:38:21 +02:00
parent cc39f8879a
commit 9d28f89c15

View File

@ -9,6 +9,7 @@ import net.knarcraft.blacksmith.listener.PlayerListener;
import net.knarcraft.blacksmith.manager.EconomyManager;
import net.knarcraft.blacksmith.trait.BlacksmithTrait;
import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
@ -56,6 +57,10 @@ public class BlacksmithPlugin extends JavaPlugin {
public void onEnable() {
instance = this;
FileConfiguration fileConfiguration = this.getConfig();
this.saveDefaultConfig();
fileConfiguration.options().copyDefaults(true);
//Load settings
config = new GlobalSettings(this);
config.load();