Fix StartupQuery not working more than once on the client (#6699)
This commit is contained in:
parent
45b90a0d45
commit
a3e4b75c59
1 changed files with 1 additions and 4 deletions
|
@ -118,7 +118,6 @@ public class StartupQuery {
|
||||||
MinecraftServer server = ServerLifecycleHooks.getCurrentServer();
|
MinecraftServer server = ServerLifecycleHooks.getCurrentServer();
|
||||||
if (server != null) server.initiateShutdown(false);
|
if (server != null) server.initiateShutdown(false);
|
||||||
|
|
||||||
aborted = true; // to abort loading and go back to the main menu
|
|
||||||
throw new AbortedException(); // to halt the server
|
throw new AbortedException(); // to halt the server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +127,6 @@ public class StartupQuery {
|
||||||
public static void reset()
|
public static void reset()
|
||||||
{
|
{
|
||||||
pending = null;
|
pending = null;
|
||||||
aborted = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean check()
|
public static boolean check()
|
||||||
|
@ -156,7 +154,7 @@ public class StartupQuery {
|
||||||
pending = null;
|
pending = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return !aborted;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void throwException() throws InterruptedException
|
private void throwException() throws InterruptedException
|
||||||
|
@ -165,7 +163,6 @@ public class StartupQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static volatile StartupQuery pending;
|
private static volatile StartupQuery pending;
|
||||||
private static volatile boolean aborted = false;
|
|
||||||
|
|
||||||
|
|
||||||
private StartupQuery(String header, String text, String action, @Nullable AtomicBoolean result)
|
private StartupQuery(String header, String text, String action, @Nullable AtomicBoolean result)
|
||||||
|
|
Loading…
Reference in a new issue