diff --git a/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java b/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java index 1dc7cf3..80ec815 100644 --- a/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java +++ b/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java @@ -62,7 +62,9 @@ public class BlacksmithPlugin extends JavaPlugin { //Copy default config to disk FileConfiguration fileConfiguration = this.getConfig(); this.saveDefaultConfig(); + this.reloadConfig(); fileConfiguration.options().copyDefaults(true); + this.saveConfig(); //Load settings config = new GlobalSettings(this); diff --git a/src/main/java/net/knarcraft/blacksmith/config/NPCSettings.java b/src/main/java/net/knarcraft/blacksmith/config/NPCSettings.java index 5c2693e..ff9d3a5 100644 --- a/src/main/java/net/knarcraft/blacksmith/config/NPCSettings.java +++ b/src/main/java/net/knarcraft/blacksmith/config/NPCSettings.java @@ -63,7 +63,6 @@ public class NPCSettings { */ public void changeSetting(NPCSetting setting, Object newValue) { if (setting == NPCSetting.REFORGE_ABLE_ITEMS) { - newValue = replaceReforgeAblePlaceholders(newValue); currentValues.put(setting, newValue); updateReforgeAbleItems(); } else { @@ -334,7 +333,7 @@ public class NPCSettings { * @param value
The value specified by a user
* @returnThe value with placeholders replaced
*/ - private Object replaceReforgeAblePlaceholders(Object value) { + private Object replaceReforgeAblePresets(Object value) { if (value instanceof String string) { String[] list = string.split(","); List