Fix StartupQuery not working more than once on the client (#6699)

This commit is contained in:
Take Weiland 2020-06-13 00:36:00 +02:00 committed by GitHub
parent 45b90a0d45
commit a3e4b75c59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,7 +118,6 @@ public class StartupQuery {
MinecraftServer server = ServerLifecycleHooks.getCurrentServer();
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
}
@ -128,7 +127,6 @@ public class StartupQuery {
public static void reset()
{
pending = null;
aborted = false;
}
public static boolean check()
@ -156,7 +154,7 @@ public class StartupQuery {
pending = null;
}
return !aborted;
return true;
}
private void throwException() throws InterruptedException
@ -165,7 +163,6 @@ public class StartupQuery {
}
private static volatile StartupQuery pending;
private static volatile boolean aborted = false;
private StartupQuery(String header, String text, String action, @Nullable AtomicBoolean result)