This commit is contained in:
H31IX committed 2012-09-03 15:48:51 -04:00
1 parent b4b1f62ee7
commit 16aa24d37d
2 files changed
+13 -5

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.h31ix.anticheat</groupId> <groupId>net.h31ix.anticheat</groupId>
<artifactId>AntiCheat</artifactId> <artifactId>AntiCheat</artifactId>
<version>1.3.6-DEV</version> <version>1.3.6</version>
<name>AntiCheat</name> <name>AntiCheat</name>
<url>http://H31IX.NET/</url> <url>http://H31IX.NET/</url>
<repositories> <repositories>
@@ -42,7 +42,7 @@
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.3.1-R1.0</version> <version>1.3.2-R0.1</version>
<type>jar</type> <type>jar</type>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
@@ -506,7 +506,7 @@ public class Updater
if(title.split("v").length == 2) if(title.split("v").length == 2)
{ {
String remoteVersion = title.split("v")[1].split(" ")[0]; // Get the newest file's version number 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 // We already have the latest version, or this build is tagged for no-update
result = Updater.UpdateResult.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 * 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) for(String string : noUpdateTag)
{ {
if(version.contains(string)) 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; return false;