T2CodeLib/src/main/java/net/t2code/lib/Spigot/system/config/SelectLibConfig.java

55 lines
1.7 KiB
Java
Raw Normal View History

2021-11-28 01:13:21 +00:00
package net.t2code.lib.Spigot.system.config;
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 {
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() {
File config = new File(T2CodeMain.getPath(), "config.yml");
2021-11-28 01:13:21 +00:00
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
UpdateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.UpdateCheck.OnJoin");
t2cTestDevelopment = yamlConfiguration.getBoolean("t2cTestDevelopment");
UpdateCheckTimeInterval = yamlConfiguration.getInt("Plugin.UpdateCheck.TimeInterval");
2021-11-28 01:13:21 +00:00
Debug = yamlConfiguration.getBoolean("Plugin.Debug");
language = yamlConfiguration.getString("Plugin.language");
InventoriesCloseByServerStop = yamlConfiguration.getBoolean("Player.Inventories.CloseByServerStop");
}
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
}