T2CodeLib/src/main/java/net/t2code/t2codelib/SPIGOT/system/config/config/SelectLibConfig.java

54 lines
2.1 KiB
Java
Raw Normal View History

2022-10-25 13:03:07 +00:00
package net.t2code.t2codelib.SPIGOT.system.config.config;
2021-11-28 01:13:21 +00:00
2022-12-29 21:02:05 +00:00
import lombok.Getter;
2022-10-25 13:03:07 +00:00
import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain;
2021-11-28 01:13:21 +00:00
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
public class SelectLibConfig {
2022-12-29 21:02:05 +00:00
@Getter
2022-11-14 21:59:17 +00:00
private static Boolean updateCheckOnJoin;
2022-12-29 21:02:05 +00:00
@Getter
2022-11-14 17:45:54 +00:00
private static Boolean t2cTestDevelopment = false;
2022-12-29 21:02:05 +00:00
@Getter
2022-11-14 21:59:17 +00:00
private static Integer updateCheckTimeInterval;
2022-12-29 21:02:05 +00:00
@Getter
2022-11-14 21:59:17 +00:00
private static Boolean seePreReleaseUpdates;
2022-12-29 21:02:05 +00:00
@Getter
private static Boolean updateCheckFullDisable;
@Getter
2022-11-14 21:59:17 +00:00
private static Boolean debug;
2022-12-29 21:02:05 +00:00
@Getter
private static String language;
2022-12-29 21:02:05 +00:00
@Getter
2023-06-30 15:57:59 +00:00
private static Boolean developerTool;
@Getter
private static Boolean bungee;
2022-12-29 21:02:05 +00:00
@Getter
2022-11-14 21:59:17 +00:00
private static Boolean inventoriesCloseByServerStop;
2023-07-16 06:22:30 +00:00
@Getter
private static String commandPermToggleCommand;
2021-11-28 01:13:21 +00:00
public static void onSelect() {
2022-10-25 13:03:07 +00:00
File config = new File(T2CodeLibMain.getPath(), "config.yml");
2021-11-28 01:13:21 +00:00
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
if (yamlConfiguration.contains("t2cTestDevelopment")) {
2022-11-14 21:59:17 +00:00
t2cTestDevelopment = yamlConfiguration.getBoolean("t2cTestDevelopment");
}
updateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.UpdateCheck.OnJoin");
updateCheckTimeInterval = yamlConfiguration.getInt("Plugin.UpdateCheck.TimeInterval");
seePreReleaseUpdates = yamlConfiguration.getBoolean("Plugin.UpdateCheck.SeePreReleaseUpdates");
updateCheckFullDisable = yamlConfiguration.getBoolean("Plugin.UpdateCheck.AllPlugins.FullDisable");
2022-11-14 21:59:17 +00:00
debug = yamlConfiguration.getBoolean("Plugin.Debug");
2021-11-28 01:13:21 +00:00
language = yamlConfiguration.getString("Plugin.language");
2023-06-30 15:57:59 +00:00
developerTool = yamlConfiguration.getBoolean("Plugin.Not recommended to disable.developerTool");
bungee = yamlConfiguration.getBoolean("BungeeCord.Enable");
2022-11-14 21:59:17 +00:00
inventoriesCloseByServerStop = yamlConfiguration.getBoolean("Player.Inventories.CloseByServerStop");
2023-07-16 06:22:30 +00:00
commandPermToggleCommand = yamlConfiguration.getString("Command.PermToggle.PermissionSetCommand");
}
2021-11-28 01:13:21 +00:00
}