mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
1.3.6
This commit is contained in:
1 parent
b4b1f62ee7
commit
16aa24d37d
2 files changed
+13
-5
No files matched your search
@@ -506,7 +506,7 @@ public class Updater
|
||||
if(title.split("v").length == 2)
|
||||
{
|
||||
String remoteVersion = title.split("v")[1].split(" ")[0]; // Get the newest file's version number
|
||||
if(hasTag(version) || version.equalsIgnoreCase(remoteVersion))
|
||||
if(hasTag(version, remoteVersion) || version.equalsIgnoreCase(remoteVersion))
|
||||
{
|
||||
// We already have the latest version, or this build is tagged for no-update
|
||||
result = Updater.UpdateResult.NO_UPDATE;
|
||||
@@ -529,13 +529,21 @@ public class Updater
|
||||
/**
|
||||
* Evaluate whether the version number is marked showing that it should not be updated by this program
|
||||
*/
|
||||
private boolean hasTag(String version)
|
||||
private boolean hasTag(String version, String remoteVersion)
|
||||
{
|
||||
for(String string : noUpdateTag)
|
||||
{
|
||||
if(version.contains(string))
|
||||
{
|
||||
return true;
|
||||
if(version.replaceAll(string, "").equals(remoteVersion))
|
||||
{
|
||||
// The build has a tag, but the version was upgraded to release so we should do an update anyway
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user