16.7_beta-1

This commit is contained in:
JaTiTV 2024-07-11 15:22:02 +02:00
parent 2f7f8e3bee
commit 7b574ffa02
2 changed files with 8 additions and 8 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId> <artifactId>T2CodeLib</artifactId>
<version>16.7_dev-27</version> <version>16.7_beta-1</version>
<!--version>VERSION_snapshot-0</version--> <!--version>VERSION_snapshot-0</version-->
<!--version>VERSION_beta-0</version--> <!--version>VERSION_beta-0</version-->
<!--version>VERSION_dev-0</version--> <!--version>VERSION_dev-0</version-->

View File

@ -21,6 +21,7 @@ public class T2C_ConfigWriter {
private static FileConfiguration config; private static FileConfiguration config;
public static void createConfig(String prefix, File configFile, T2C_ConfigItem[] values, boolean isReload, String... header) { public static void createConfig(String prefix, File configFile, T2C_ConfigItem[] values, boolean isReload, String... header) {
long long_ = System.currentTimeMillis();
boolean exist = configFile.exists(); boolean exist = configFile.exists();
if (!exist) { if (!exist) {
configFile.getParentFile().mkdir(); configFile.getParentFile().mkdir();
@ -62,21 +63,20 @@ public class T2C_ConfigWriter {
} }
// Copy default values if they are missing // Copy default values if they are missing
config.options().copyDefaults(true); config.options().copyDefaults(true);
T2C_YmlWriter.saveConfigWithComments(configFile, config, comments, false,header); T2C_YmlWriter.saveConfigWithComments(configFile, config, comments, false, header);
readConfig(prefix, configFile, config, values, isReload); readConfig(prefix, configFile, config, values, isReload, long_);
} }
private static void readConfig(String prefix, File configFile, FileConfiguration config, T2C_ConfigItem[] values, boolean isReload) { private static void readConfig(String prefix, File configFile, FileConfiguration config, T2C_ConfigItem[] values, boolean isReload, long long_) {
for (T2C_ConfigItem value : values) { for (T2C_ConfigItem value : values) {
value.setValue(config.get(value.getPath())); value.setValue(config.get(value.getPath()));
} }
T2C_Send.sendStartTextCenter(prefix, "§2" + configFile.getName() + " were successfully created / updated.", isReload); T2C_Send.sendStartTextCenter(prefix, "§2Load successfully: §7" + configFile.getPath() + "/" + config.getName().replace("/","")+" §7- §e"+ (System.currentTimeMillis() - long_) + "ms", isReload);
// T2C_Send.sendStartTextCenter(prefix, "§2Has been successfully created / updated §7- §e" + (System.currentTimeMillis() - long_) + "ms", isReload);
//T2C_Send.sendStartTextCenter(prefix, "", isReload);
//T2C_Send.sendStartTextCenter(Util.getPrefix(), "§2opWhitelist.yml were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms",isReload); //T2C_Send.sendStartTextCenter(Util.getPrefix(), "§2opWhitelist.yml were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms",isReload);
} }
} }