Compare commits

..

No commits in common. "5f2c2cacbe209299b28e64fabfed3a1feadf76c8" and "7b574ffa024cad032721117ab68d537f9f64c252" have entirely different histories.

2 changed files with 6 additions and 7 deletions

View File

@ -8,7 +8,7 @@ import java.io.File;
public class ConvertT2ClibConfig { public class ConvertT2ClibConfig {
private static YamlConfiguration yamlConfiguration; private static YamlConfiguration yamlConfiguration;
public static void convert() { public static void convert() {
@ -18,7 +18,7 @@ public class ConvertT2ClibConfig {
yamlConfiguration = YamlConfiguration.loadConfiguration(config); yamlConfiguration = YamlConfiguration.loadConfiguration(config);
if (yamlConfiguration.contains("proxy.serverUUID")) return; if (yamlConfiguration.contains("plugin.updateCheck.onJoin")) return;
set("Plugin.UpdateCheck.OnJoin", T2C_LibConfig.VALUES.updateCheckOnJoin); set("Plugin.UpdateCheck.OnJoin", T2C_LibConfig.VALUES.updateCheckOnJoin);
set("Plugin.UpdateCheck.TimeInterval", T2C_LibConfig.VALUES.updateCheckTimeInterval); set("Plugin.UpdateCheck.TimeInterval", T2C_LibConfig.VALUES.updateCheckTimeInterval);
@ -29,12 +29,12 @@ public class ConvertT2ClibConfig {
set("Plugin.Not recommended to disable.developerTool", T2C_LibConfig.VALUES.developerTool); set("Plugin.Not recommended to disable.developerTool", T2C_LibConfig.VALUES.developerTool);
set("BungeeCord.Enable", T2C_LibConfig.VALUES.proxy); set("BungeeCord.Enable", T2C_LibConfig.VALUES.proxy);
set("Player.Inventories.CloseByServerStop", T2C_LibConfig.VALUES.inventoriesCloseByServerStop); set("Player.Inventories.CloseByServerStop", T2C_LibConfig.VALUES.inventoriesCloseByServerStop);
set("Command.PermToggle.PermissionSetCommand", T2C_LibConfig.VALUES.commandPermToggleCommand); set("Command.PermToggle.PermissionSetCommand", T2C_LibConfig.VALUES.updateCheckOnJoin);
config.delete();
} }
private static void set(String path, T2C_ConfigItem item) { private static void set(String path, T2C_ConfigItem item){
if (yamlConfiguration.contains(path)) { if (yamlConfiguration.contains(path)){
item.setValue(yamlConfiguration.get(path)); item.setValue(yamlConfiguration.get(path));
} }
} }

View File

@ -133,7 +133,6 @@ public class T2C_LibConfig {
public static void set(boolean isReload) { public static void set(boolean isReload) {
long long_ = System.currentTimeMillis(); long long_ = System.currentTimeMillis();
ConvertT2ClibConfig.convert();
T2C_ConfigWriter.createConfig(T2C_Util.getPrefix(), new File(T2C_Main.getPath(), "config.yml"), VALUES.values(), isReload, T2C_Util.getConfigLogo()); T2C_ConfigWriter.createConfig(T2C_Util.getPrefix(), new File(T2C_Main.getPath(), "config.yml"), VALUES.values(), isReload, T2C_Util.getConfigLogo());
} }