Merge pull request #542 from Dbarkovski/patch-1

Fix support ServerWrapper 1.18
This commit is contained in:
Gravit 2021-12-09 01:18:21 +07:00 committed by GitHub
commit 3b8a01fbb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,12 +86,12 @@ public void run() throws Exception {
((AutoCloseable) Request.getRequestService()).close();
}
}
if(wrapper.profile != null && wrapper.profile.getVersion().compareTo(ClientProfile.Version.MC118) >= 0) {
LogHelper.info("Switch to alternative start mode (1.18)");
wrapper.config.classpath.add(jarName);
wrapper.config.classLoaderConfig = ClientProfile.ClassLoaderConfig.LAUNCHER;
altMode = true;
}
}
if(wrapper.profile != null && wrapper.profile.getVersion().compareTo(ClientProfile.Version.MC118) >= 0) {
LogHelper.info("Switch to alternative start mode (1.18)");
wrapper.config.classpath.add(jarName);
wrapper.config.classLoaderConfig = ClientProfile.ClassLoaderConfig.LAUNCHER;
altMode = true;
}
wrapper.saveConfig();
LogHelper.info("Generate start script");