File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
src/main/java/lol/hyper/customlauncher/login Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -60,18 +60,20 @@ public void run() {
6060 Map <String , String > env = pb .environment ();
6161 env .put ("TTR_GAMESERVER" , this .gameServer );
6262 env .put ("TTR_PLAYCOOKIE" , this .cookie );
63- try {
64- Process p = pb .start ();
65- p .getInputStream ().close ();
66- } catch (IOException e ) {
67- logger .error ("Unable to launch game!" , e );
68- JFrame errorWindow =
69- new ErrorWindow (
70- "Unable to launch game.\n "
71- + e .getClass ().getCanonicalName ()
72- + ": "
73- + e .getMessage ());
74- errorWindow .dispose ();
75- }
63+ Thread t1 = new Thread (() -> {
64+ try {
65+ pb .start ();
66+ } catch (IOException e ) {
67+ logger .error ("Unable to launch game!" , e );
68+ JFrame errorWindow =
69+ new ErrorWindow (
70+ "Unable to launch game.\n "
71+ + e .getClass ().getCanonicalName ()
72+ + ": "
73+ + e .getMessage ());
74+ errorWindow .dispose ();
75+ }
76+ });
77+ t1 .start ();
7678 }
7779}
You can’t perform that action at this time.
0 commit comments