Fix: version::compareTo compares the name, instead of the game version. (#2664)
* Fix: version.compareTo compares the name, but not the game version. * Fix more. * update * update Co-authored-by: zkitefly <z18344203426@qq.com> --------- Co-authored-by: Glavo <zjx001202@gmail.com> Co-authored-by: zkitefly <z18344203426@qq.com>
This commit is contained in:
@@ -256,7 +256,7 @@ public class DefaultLauncher extends Launcher {
|
||||
|
||||
if (StringUtils.isNotBlank(options.getServerIp())) {
|
||||
String[] args = options.getServerIp().split(":");
|
||||
if (version.compareTo(new Version("1.20")) < 0) {
|
||||
if (VersionNumber.VERSION_COMPARATOR.compare(repository.getGameVersion(version).orElse("0.0"), "1.20") < 0) {
|
||||
res.add("--server");
|
||||
res.add(args[0]);
|
||||
res.add("--port");
|
||||
|
||||
Reference in New Issue
Block a user