seePreReleaseUpdates #1
This commit is contained in:
parent
f0b5b2e65b
commit
8114035cd9
@ -31,6 +31,7 @@ public class T2CBupdateAPI {
|
||||
String pluginVersion = plugin.getDescription().getVersion();
|
||||
String value;
|
||||
if (webData.isPreRelease()) {
|
||||
if (!T2CBlibConfig.getSeePreReleaseUpdates()) return;
|
||||
value = UpdateType.PRERELEASE.text;
|
||||
if (publicVersion.toLowerCase().contains("dev")) {
|
||||
value = UpdateType.DEVELOPMENT.text;
|
||||
|
@ -36,6 +36,7 @@ public class T2CBlibConfig {
|
||||
Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(config);
|
||||
|
||||
updateTimer = configuration.getInt("UpdateCheck.TimerInMin");
|
||||
seePreReleaseUpdates = configuration.getBoolean("UpdateCheck.SeePreReleaseUpdates");
|
||||
|
||||
apiCommandGUIEnable = configuration.getBoolean("API.CommandGUI.Enable");
|
||||
apiAutoResponse = configuration.getBoolean("API.AutoResponse.Enable");
|
||||
@ -43,6 +44,7 @@ public class T2CBlibConfig {
|
||||
}
|
||||
|
||||
private static Integer updateTimer;
|
||||
private static Boolean seePreReleaseUpdates;
|
||||
private static Boolean apiCommandGUIEnable;
|
||||
private static Boolean apiAutoResponse;
|
||||
private static Boolean apiOpSecurity;
|
||||
@ -51,6 +53,10 @@ public class T2CBlibConfig {
|
||||
return updateTimer;
|
||||
}
|
||||
|
||||
public static Boolean getSeePreReleaseUpdates() {
|
||||
return seePreReleaseUpdates;
|
||||
}
|
||||
|
||||
public static Boolean getApiCommandGUIEnable() {
|
||||
return apiCommandGUIEnable;
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ public class T2CupdateAPI {
|
||||
String value;
|
||||
|
||||
if (webData.isPreRelease()) {
|
||||
if (!SelectLibConfig.getSeePreReleaseUpdates()) return;
|
||||
value = UpdateType.PRERELEASE.text;
|
||||
if (publicVersion.toLowerCase().contains("dev")) {
|
||||
value = UpdateType.DEVELOPMENT.text;
|
||||
|
@ -158,11 +158,13 @@ public class CreateReportLog {
|
||||
zipFile.delete();
|
||||
directoryTemp.delete();
|
||||
if (sender instanceof Player) {
|
||||
T2Csend.sender(sender, Util.getPrefix() + ("<green>A DebugLog zip has been created. You can download it <click:open_url:'[url]'>" +
|
||||
"<gold><hover:show_text:'<yellow>Download the debug file</yellow>'>here</hover></gold></click>. Please enter the following key " +
|
||||
"in the ticket: <gold><click:copy_to_clipboard:[key]><hover:show_text:'<yellow>Copy to clipboard</yellow>'>[key]</hover></click></gold></green>" +
|
||||
"<br><dark_red>Do not share the download URL with anyone!</dark_red><br><click:run_command:'/t2code debug deleteReportLog [key]'>" +
|
||||
"<green>You can <hover:show_text:'<yellow>Click to delete</yellow>'><b>delte</b></hover> yor Debug-File by clicking me.</green></click>").replace("[key]", fileID).replace("[url]", downloadURL));
|
||||
T2Csend.sender(sender, ("[prefix] <green>A DebugLog zip has been created." +
|
||||
"<br>[prefix] You can download it <click:open_url:'[url]'><gold><hover:show_text:'<yellow>Download the debug file</yellow>'>here</hover></gold></click>." +
|
||||
"<br>[prefix] Please enter the following key in the ticket: <gold><click:copy_to_clipboard:[key]><hover:show_text:'<yellow>Copy to clipboard</yellow>'>[key]</hover></click></gold></green>" +
|
||||
"<br>[prefix]<dark_red>Do not share the download URL with anyone!</dark_red>" +
|
||||
"<br>[prefix] <click:run_command:'/t2code debug deleteReportLog [key]'><hover:show_text:'<yellow>Click to delete</yellow>'><green>You can <b>delte</b> yor Debug-File by clicking me.</green></click>" +
|
||||
"<br>[prefix] <color:#910d06>(If you do not delete the debug file, it will be deleted automatically after <red>14</red> days!)</color></hover>").replace("[key]", fileID)
|
||||
.replace("[url]", downloadURL).replace("[prefix]",Util.getPrefix()));
|
||||
}
|
||||
T2Csend.console(Util.getPrefix() + (" §6A DebugLog zip has been created. You can download it here: [url].\n§6Please enter the following key in the ticket:" +
|
||||
" §e[key].\n§4Do not share the download URL with anyone!\nYou can delte yor Debug-File with the following command: /t2code debug deleteReportLog [key].")
|
||||
|
@ -24,6 +24,7 @@ public class ConfigCreate {
|
||||
|
||||
T2Cconfig.set("Plugin.UpdateCheck.OnJoin", true, yamlConfiguration);
|
||||
T2Cconfig.set("Plugin.UpdateCheck.TimeInterval", 60, yamlConfiguration);
|
||||
T2Cconfig.set("Plugin.UpdateCheck.SeePreReleaseUpdates", true, yamlConfiguration);
|
||||
T2Cconfig.set("Plugin.language", "english", yamlConfiguration);
|
||||
|
||||
T2Cconfig.set("BungeeCord.Enable", false, yamlConfiguration);
|
||||
|
@ -7,29 +7,34 @@ import java.io.File;
|
||||
|
||||
public class SelectLibConfig {
|
||||
|
||||
private static Boolean UpdateCheckOnJoin;
|
||||
private static Boolean updateCheckOnJoin;
|
||||
private static Boolean t2cTestDevelopment = false;
|
||||
private static Integer UpdateCheckTimeInterval;
|
||||
private static Boolean Debug;
|
||||
private static Integer updateCheckTimeInterval;
|
||||
private static Boolean seePreReleaseUpdates;
|
||||
private static Boolean debug;
|
||||
private static String language;
|
||||
private static Boolean bungee;
|
||||
private static Boolean InventoriesCloseByServerStop;
|
||||
private static Boolean inventoriesCloseByServerStop;
|
||||
|
||||
public static void onSelect() {
|
||||
File config = new File(T2CodeLibMain.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");
|
||||
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");
|
||||
inventoriesCloseByServerStop = yamlConfiguration.getBoolean("Player.Inventories.CloseByServerStop");
|
||||
}
|
||||
|
||||
public static Boolean getUpdateCheckOnJoin() {
|
||||
return UpdateCheckOnJoin;
|
||||
return updateCheckOnJoin;
|
||||
}
|
||||
|
||||
public static Boolean getT2cTestDevelopment() {
|
||||
@ -37,11 +42,15 @@ public class SelectLibConfig {
|
||||
}
|
||||
|
||||
public static Integer getUpdateCheckTimeInterval() {
|
||||
return UpdateCheckTimeInterval;
|
||||
return updateCheckTimeInterval;
|
||||
}
|
||||
|
||||
public static Boolean getSeePreReleaseUpdates() {
|
||||
return seePreReleaseUpdates;
|
||||
}
|
||||
|
||||
public static Boolean getDebug() {
|
||||
return Debug;
|
||||
return debug;
|
||||
}
|
||||
|
||||
public static String getLanguage() {
|
||||
@ -53,7 +62,7 @@ public class SelectLibConfig {
|
||||
}
|
||||
|
||||
public static Boolean getInventoriesCloseByServerStop() {
|
||||
return InventoriesCloseByServerStop;
|
||||
return inventoriesCloseByServerStop;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user