NOISSUE Make LauncherPart aware of server to join

This commit is contained in:
Janrupf
2021-05-22 16:32:15 +02:00
parent 23a706bbae
commit 0ccd7223fd
3 changed files with 42 additions and 3 deletions

View File

@ -46,7 +46,16 @@ public class LegacyFrame extends Frame implements WindowListener
this.addWindowListener ( this );
}
public void start ( Applet mcApplet, String user, String session, int winSizeW, int winSizeH, boolean maximize )
public void start (
Applet mcApplet,
String user,
String session,
int winSizeW,
int winSizeH,
boolean maximize,
String serverAddress,
String serverPort
)
{
try {
appletWrap = new Launcher( mcApplet, new URL ( "http://www.minecraft.net/game" ) );
@ -95,6 +104,13 @@ public class LegacyFrame extends Frame implements WindowListener
e.printStackTrace(System.err);
System.exit(-1);
}
if (serverAddress != null)
{
appletWrap.setParameter("server", serverAddress);
appletWrap.setParameter("port", serverPort);
}
appletWrap.setParameter ( "username", user );
appletWrap.setParameter ( "sessionid", session );
appletWrap.setParameter ( "stand-alone", "true" ); // Show the quit button.