若版本号包含SNAPSHOT则也不更新
通过Gradle构建出来的JAR版本号为3.1.SNAPSHOT这样的
This commit is contained in:
@@ -78,7 +78,7 @@ public final class UpdateChecker {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() throws Exception {
|
public void execute() throws Exception {
|
||||||
if (Launcher.VERSION.contains("@"))
|
if (isDevelopmentVersion(Launcher.VERSION))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
@@ -103,6 +103,11 @@ public final class UpdateChecker {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isDevelopmentVersion(String version) {
|
||||||
|
return version.contains("@") || // eg. @HELLO_MINECRAFT_LAUNCHER_VERSION_FOR_GRADLE_REPLACING@
|
||||||
|
version.contains("SNAPSHOT"); // eg. 3.1.SNAPSHOT
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the <b>cached</b> newest version number, use "process" method to
|
* Get the <b>cached</b> newest version number, use "process" method to
|
||||||
* download!
|
* download!
|
||||||
|
|||||||
Reference in New Issue
Block a user