fix: allow demo for older versions

We were not propagating the '--demo' flag in the legacy launcher,
unconditionally setting the 'demo' parameter to false.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-07-13 15:45:41 -03:00
parent 29dcb9d274
commit 5765a1fdf1
2 changed files with 5 additions and 3 deletions

View File

@ -63,7 +63,8 @@ public final class LegacyFrame extends Frame {
int winSizeH, int winSizeH,
boolean maximize, boolean maximize,
String serverAddress, String serverAddress,
String serverPort String serverPort,
boolean isDemo
) { ) {
// Implements support for launching in to multiplayer on classic servers using a mpticket // Implements support for launching in to multiplayer on classic servers using a mpticket
// file generated by an external program and stored in the instance's root folder. // file generated by an external program and stored in the instance's root folder.
@ -106,7 +107,7 @@ public final class LegacyFrame extends Frame {
appletWrap.setParameter("sessionid", session); appletWrap.setParameter("sessionid", session);
appletWrap.setParameter("stand-alone", "true"); // Show the quit button. appletWrap.setParameter("stand-alone", "true"); // Show the quit button.
appletWrap.setParameter("haspaid", "true"); // Some old versions need this for world saves to work. appletWrap.setParameter("haspaid", "true"); // Some old versions need this for world saves to work.
appletWrap.setParameter("demo", "false"); appletWrap.setParameter("demo", isDemo ? "true" : "false");
appletWrap.setParameter("fullscreen", "false"); appletWrap.setParameter("fullscreen", "false");
add(appletWrap); add(appletWrap);

View File

@ -137,7 +137,8 @@ public final class OneSixLauncher implements Launcher {
winSizeH, winSizeH,
maximize, maximize,
serverAddress, serverAddress,
serverPort serverPort,
mcParams.contains("--demo")
); );
return; return;