diff --git a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java index 0940a6dd9..6116604e0 100644 --- a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java +++ b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java @@ -249,7 +249,8 @@ public class GeyserSession implements GeyserConnection, CommandSender { private Vector2i lastChunkPosition = null; private int renderDistance; - private boolean sentSpawnPacket; + // Exposed for GeyserConnect usage + protected boolean sentSpawnPacket; private boolean loggedIn; private boolean loggingIn; diff --git a/core/src/main/java/org/geysermc/geyser/util/LoginEncryptionUtils.java b/core/src/main/java/org/geysermc/geyser/util/LoginEncryptionUtils.java index 213953bdd..e677798cd 100644 --- a/core/src/main/java/org/geysermc/geyser/util/LoginEncryptionUtils.java +++ b/core/src/main/java/org/geysermc/geyser/util/LoginEncryptionUtils.java @@ -213,6 +213,11 @@ public class LoginEncryptionUtils { } public static void buildAndShowLoginWindow(GeyserSession session) { + if (session.isLoggedIn()) { + // Can happen if a window is cancelled during dimension switch + return; + } + // Set DoDaylightCycle to false so the time doesn't accelerate while we're here session.setDaylightCycle(false);