diff --git a/pom.xml b/pom.xml
index 3ccb9ec..46d0628 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
net.t2code
T2CodeLib
- 16.7_dev-2
+ 16.7_dev-3
diff --git a/src/main/java/net/t2code/t2codelib/BUNGEE/api/yaml/T2CBconfigWriter.java b/src/main/java/net/t2code/t2codelib/BUNGEE/api/yaml/T2CBconfigWriter.java
index 27825ad..5d43294 100644
--- a/src/main/java/net/t2code/t2codelib/BUNGEE/api/yaml/T2CBconfigWriter.java
+++ b/src/main/java/net/t2code/t2codelib/BUNGEE/api/yaml/T2CBconfigWriter.java
@@ -20,7 +20,8 @@ public class T2CBconfigWriter {
public static void createConfig(File configFile, T2CconfigItem[] values, String... header) {
- if (!configFile.exists()) {
+ boolean exist = configFile.exists();
+ if (!exist) {
configFile.getParentFile().mkdirs();
try {
configFile.createNewFile();
@@ -38,10 +39,13 @@ public class T2CBconfigWriter {
Map> comments = new LinkedHashMap<>();
for(T2CconfigItem item : values){
- if(!config.contains(item.getPath())){
- config.set(item.getPath(), item.getValue());
+ if (item.getForceSet() || !exist) {
+ if(!config.contains(item.getPath())){
+ config.set(item.getPath(), item.getValue());
+ }
+ comments.put(item.getPath(), item.getComments());
}
- comments.put(item.getPath(), item.getComments());
+
}
saveConfigWithComments(configFile, comments, header);
readConfig(config,values);
@@ -93,7 +97,21 @@ public class T2CBconfigWriter {
addSection((Configuration) value, comments, builder, fullKey, indentLevel + 1);
} else {
// Add value with proper indentation
- builder.append(indent).append(key).append(": ").append(value).append("\n");
+ // builder.append(indent).append(key).append(": ").append(value).append("\n");
+ if (value instanceof List) {
+ builder.append(indent).append(key).append(": ").append("\n");
+ List