From 9d28f89c153fac4129994bb6f4303ec2e8180466 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Mon, 8 Aug 2022 18:38:21 +0200 Subject: [PATCH] Makes sure to copy the default config --- src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java b/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java index d585dca..9cb62ce 100644 --- a/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java +++ b/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java @@ -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();