16.7_beta-1
This commit is contained in:
parent
2f7f8e3bee
commit
7b574ffa02
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>T2CodeLib</artifactId>
|
||||
<version>16.7_dev-27</version>
|
||||
<version>16.7_beta-1</version>
|
||||
<!--version>VERSION_snapshot-0</version-->
|
||||
<!--version>VERSION_beta-0</version-->
|
||||
<!--version>VERSION_dev-0</version-->
|
||||
|
@ -21,6 +21,7 @@ public class T2C_ConfigWriter {
|
||||
private static FileConfiguration config;
|
||||
|
||||
public static void createConfig(String prefix, File configFile, T2C_ConfigItem[] values, boolean isReload, String... header) {
|
||||
long long_ = System.currentTimeMillis();
|
||||
boolean exist = configFile.exists();
|
||||
if (!exist) {
|
||||
configFile.getParentFile().mkdir();
|
||||
@ -62,21 +63,20 @@ public class T2C_ConfigWriter {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Copy default values if they are missing
|
||||
config.options().copyDefaults(true);
|
||||
|
||||
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) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user