13.4_SNAPSHOT-2
This commit is contained in:
@@ -31,7 +31,6 @@ 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;
|
||||
@@ -69,7 +68,8 @@ public class T2CBupdateAPI {
|
||||
plugin.getDescription().getVersion(),
|
||||
webData,
|
||||
false,
|
||||
!plugin.getDescription().getVersion().equals(webData.getVersion())
|
||||
!plugin.getDescription().getVersion().equals(webData.getVersion()),
|
||||
true
|
||||
);
|
||||
bungeePluginVersins.put(plugin.getDescription().getName(), update);
|
||||
if (!pluginVersion.replace("_Bungee", "").equalsIgnoreCase(webData.getVersion())) {
|
||||
|
@@ -2,6 +2,8 @@ package net.t2code.t2codelib.BUNGEE.api.update;
|
||||
|
||||
import net.md_5.bungee.BungeeCord;
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
import net.t2code.t2codelib.BUNGEE.system.config.T2CBlibConfig;
|
||||
import net.t2code.t2codelib.SPIGOT.system.config.config.SelectLibConfig;
|
||||
import net.t2code.t2codelib.T2CupdateObject;
|
||||
import net.t2code.t2codelib.T2CupdateWebData;
|
||||
import org.json.JSONArray;
|
||||
@@ -26,9 +28,13 @@ public class T2CBupdateCheckerGit {
|
||||
|
||||
public void getVersion(Consumer<T2CupdateWebData> consumer, String pluginVersion, Integer spigotID, String gitKey) {
|
||||
String RepoURL = "https://git.t2code.net/api/v1/repos/" + gitKey + "/releases?limit=1";
|
||||
if (!T2CBlibConfig.getSeePreReleaseUpdates()){
|
||||
RepoURL = RepoURL + "&pre-release=false";
|
||||
}
|
||||
String finalRepoURL = RepoURL;
|
||||
BungeeCord.getInstance().getScheduler().runAsync(this.plugin, () -> {
|
||||
try {
|
||||
URL url = new URL(RepoURL);
|
||||
URL url = new URL(finalRepoURL);
|
||||
URLConnection yc = url.openConnection();
|
||||
BufferedReader in = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
@@ -81,7 +87,8 @@ public class T2CBupdateCheckerGit {
|
||||
pluginVersion,
|
||||
null,
|
||||
load,
|
||||
false
|
||||
false,
|
||||
true
|
||||
);
|
||||
T2CBupdateAPI.bungeePluginVersins.put(plugin.getDescription().getName(), update);
|
||||
this.plugin.getLogger().severe("§4 Cannot look for updates: " + var10.getMessage());
|
||||
|
Reference in New Issue
Block a user