54 lines
2.1 KiB
Java
54 lines
2.1 KiB
Java
package net.t2code.t2codelib.SPIGOT.system.config.config;
|
|
|
|
import lombok.Getter;
|
|
import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain;
|
|
import org.bukkit.configuration.file.YamlConfiguration;
|
|
|
|
import java.io.File;
|
|
|
|
public class SelectLibConfig {
|
|
|
|
@Getter
|
|
private static Boolean updateCheckOnJoin;
|
|
@Getter
|
|
private static Boolean t2cTestDevelopment = false;
|
|
@Getter
|
|
private static Integer updateCheckTimeInterval;
|
|
@Getter
|
|
private static Boolean seePreReleaseUpdates;
|
|
@Getter
|
|
private static Boolean updateCheckFullDisable;
|
|
@Getter
|
|
private static Boolean debug;
|
|
@Getter
|
|
private static String language;
|
|
@Getter
|
|
private static Boolean developerTool;
|
|
@Getter
|
|
private static Boolean bungee;
|
|
@Getter
|
|
private static Boolean inventoriesCloseByServerStop;
|
|
@Getter
|
|
private static String commandPermToggleCommand;
|
|
|
|
public static void onSelect() {
|
|
File config = new File(T2CodeLibMain.getPath(), "config.yml");
|
|
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
|
|
|
if (yamlConfiguration.contains("t2cTestDevelopment")) {
|
|
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");
|
|
debug = yamlConfiguration.getBoolean("Plugin.Debug");
|
|
language = yamlConfiguration.getString("Plugin.language");
|
|
developerTool = yamlConfiguration.getBoolean("Plugin.Not recommended to disable.developerTool");
|
|
bungee = yamlConfiguration.getBoolean("BungeeCord.Enable");
|
|
inventoriesCloseByServerStop = yamlConfiguration.getBoolean("Player.Inventories.CloseByServerStop");
|
|
commandPermToggleCommand = yamlConfiguration.getString("Command.PermToggle.PermissionSetCommand");
|
|
}
|
|
}
|