2021-11-28 01:13:21 +00:00
|
|
|
package net.t2code.lib.Spigot.system.config;
|
|
|
|
|
2022-06-08 03:13:00 +00:00
|
|
|
import net.t2code.lib.Spigot.system.T2CodeMain;
|
2021-11-28 01:13:21 +00:00
|
|
|
import org.bukkit.configuration.file.YamlConfiguration;
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
|
|
|
public class SelectLibConfig {
|
|
|
|
|
|
|
|
|
2022-07-07 11:43:50 +00:00
|
|
|
private static Boolean UpdateCheckOnJoin;
|
|
|
|
private static Boolean t2cTestDevelopment;
|
|
|
|
private static Integer UpdateCheckTimeInterval;
|
|
|
|
private static Boolean Debug;
|
|
|
|
private static String language;
|
|
|
|
private static Boolean InventoriesCloseByServerStop;
|
2021-11-28 01:13:21 +00:00
|
|
|
|
|
|
|
public static void onSelect() {
|
2022-06-08 03:13:00 +00:00
|
|
|
File config = new File(T2CodeMain.getPath(), "config.yml");
|
2021-11-28 01:13:21 +00:00
|
|
|
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
|
|
|
|
2021-12-31 01:36:03 +00:00
|
|
|
UpdateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.UpdateCheck.OnJoin");
|
2022-04-26 16:26:51 +00:00
|
|
|
t2cTestDevelopment = yamlConfiguration.getBoolean("t2cTestDevelopment");
|
2021-12-31 01:36:03 +00:00
|
|
|
UpdateCheckTimeInterval = yamlConfiguration.getInt("Plugin.UpdateCheck.TimeInterval");
|
2021-11-28 01:13:21 +00:00
|
|
|
Debug = yamlConfiguration.getBoolean("Plugin.Debug");
|
|
|
|
language = yamlConfiguration.getString("Plugin.language");
|
2021-12-31 00:34:41 +00:00
|
|
|
InventoriesCloseByServerStop = yamlConfiguration.getBoolean("Player.Inventories.CloseByServerStop");
|
2022-07-07 11:43:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static Boolean getUpdateCheckOnJoin() {
|
|
|
|
return UpdateCheckOnJoin;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Boolean getT2cTestDevelopment() {
|
|
|
|
return t2cTestDevelopment;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Integer getUpdateCheckTimeInterval() {
|
|
|
|
return UpdateCheckTimeInterval;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Boolean getDebug() {
|
|
|
|
return Debug;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static String getLanguage() {
|
|
|
|
return language;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Boolean getInventoriesCloseByServerStop() {
|
|
|
|
return InventoriesCloseByServerStop;
|
|
|
|
}
|
|
|
|
|
2021-11-28 01:13:21 +00:00
|
|
|
}
|