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

55 lines
1.7 KiB
Java

package net.t2code.lib.Spigot.system.config;
import net.t2code.lib.Spigot.system.T2CodeMain;
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;
public static void onSelect() {
File config = new File(T2CodeMain.getPath(), "config.yml");
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
UpdateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.UpdateCheck.OnJoin");
t2cTestDevelopment = yamlConfiguration.getBoolean("t2cTestDevelopment");
UpdateCheckTimeInterval = yamlConfiguration.getInt("Plugin.UpdateCheck.TimeInterval");
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;
}
}