69 lines
2.2 KiB
Java
69 lines
2.2 KiB
Java
package net.t2code.t2codelib.SPIGOT.system.config.config;
|
|
|
|
import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain;
|
|
import org.bukkit.configuration.file.YamlConfiguration;
|
|
|
|
import java.io.File;
|
|
|
|
public class SelectLibConfig {
|
|
|
|
private static Boolean updateCheckOnJoin;
|
|
private static Boolean t2cTestDevelopment = false;
|
|
private static Integer updateCheckTimeInterval;
|
|
private static Boolean seePreReleaseUpdates;
|
|
private static Boolean debug;
|
|
private static String language;
|
|
private static Boolean bungee;
|
|
private static Boolean inventoriesCloseByServerStop;
|
|
|
|
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");
|
|
debug = yamlConfiguration.getBoolean("Plugin.Debug");
|
|
language = yamlConfiguration.getString("Plugin.language");
|
|
bungee = yamlConfiguration.getBoolean("BungeeCord.Enable");
|
|
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 getSeePreReleaseUpdates() {
|
|
return seePreReleaseUpdates;
|
|
}
|
|
|
|
public static Boolean getDebug() {
|
|
return debug;
|
|
}
|
|
|
|
public static String getLanguage() {
|
|
return language;
|
|
}
|
|
|
|
public static Boolean getBungee() {
|
|
return bungee;
|
|
}
|
|
|
|
public static Boolean getInventoriesCloseByServerStop() {
|
|
return inventoriesCloseByServerStop;
|
|
}
|
|
|
|
}
|