From 987af06fb4c805eeda146dfbfcdf691880dbaa72 Mon Sep 17 00:00:00 2001 From: JaTiTV Date: Thu, 11 Jul 2024 13:25:13 +0200 Subject: [PATCH] small code changes --- .../net/t2code/t2codelib/SPIGOT/api/messages/T2C_Replace.java | 1 - .../net/t2code/t2codelib/SPIGOT/api/yaml/T2C_ConfigWriter.java | 2 ++ .../net/t2code/t2codelib/SPIGOT/api/yaml/T2C_YmlWriter.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/t2code/t2codelib/SPIGOT/api/messages/T2C_Replace.java b/src/main/java/net/t2code/t2codelib/SPIGOT/api/messages/T2C_Replace.java index 03d4b1b..79bc04b 100644 --- a/src/main/java/net/t2code/t2codelib/SPIGOT/api/messages/T2C_Replace.java +++ b/src/main/java/net/t2code/t2codelib/SPIGOT/api/messages/T2C_Replace.java @@ -7,7 +7,6 @@ import org.bukkit.entity.Player; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Map; public class T2C_Replace { diff --git a/src/main/java/net/t2code/t2codelib/SPIGOT/api/yaml/T2C_ConfigWriter.java b/src/main/java/net/t2code/t2codelib/SPIGOT/api/yaml/T2C_ConfigWriter.java index d5dbfea..5d3e9bb 100644 --- a/src/main/java/net/t2code/t2codelib/SPIGOT/api/yaml/T2C_ConfigWriter.java +++ b/src/main/java/net/t2code/t2codelib/SPIGOT/api/yaml/T2C_ConfigWriter.java @@ -61,6 +61,8 @@ public class T2C_ConfigWriter { } } + + // Copy default values if they are missing config.options().copyDefaults(true); diff --git a/src/main/java/net/t2code/t2codelib/SPIGOT/api/yaml/T2C_YmlWriter.java b/src/main/java/net/t2code/t2codelib/SPIGOT/api/yaml/T2C_YmlWriter.java index c878a05..e11b02d 100644 --- a/src/main/java/net/t2code/t2codelib/SPIGOT/api/yaml/T2C_YmlWriter.java +++ b/src/main/java/net/t2code/t2codelib/SPIGOT/api/yaml/T2C_YmlWriter.java @@ -12,7 +12,7 @@ import java.util.List; import java.util.Map; public class T2C_YmlWriter { - protected static void saveConfigWithComments(File file, FileConfiguration config, Map> comments, boolean oneListToString,String... headers) { + public static void saveConfigWithComments(File file, FileConfiguration config, Map> comments, boolean oneListToString,String... headers) { try { StringBuilder configContent = new StringBuilder(); for (String h : headers) {