From 2fae5060dc3784a3e6bb382154482c7c13243fa3 Mon Sep 17 00:00:00 2001 From: Smart123s <28480228+Smart123s@users.noreply.github.com> Date: Wed, 21 Sep 2022 10:39:37 +0200 Subject: [PATCH] Change Geyser AuthType classpath --- .../fastlogin/core/hooks/bedrock/GeyserService.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/github/games647/fastlogin/core/hooks/bedrock/GeyserService.java b/core/src/main/java/com/github/games647/fastlogin/core/hooks/bedrock/GeyserService.java index f3a5d995..dc60804a 100644 --- a/core/src/main/java/com/github/games647/fastlogin/core/hooks/bedrock/GeyserService.java +++ b/core/src/main/java/com/github/games647/fastlogin/core/hooks/bedrock/GeyserService.java @@ -31,8 +31,8 @@ import com.github.games647.fastlogin.core.shared.LoginSource; import java.util.UUID; import org.geysermc.geyser.GeyserImpl; +import org.geysermc.geyser.api.network.AuthType; import org.geysermc.geyser.session.GeyserSession; -import org.geysermc.geyser.session.auth.AuthType; public class GeyserService extends BedrockService { @@ -44,7 +44,7 @@ public class GeyserService extends BedrockService { super(core); this.geyser = geyser; this.core = core; - this.authType = GeyserImpl.getInstance().getConfig().getRemote().getAuthType(); + this.authType = GeyserImpl.getInstance().getConfig().getRemote().authType(); } @Override @@ -65,7 +65,12 @@ public class GeyserService extends BedrockService { @Override public GeyserSession getBedrockPlayer(String username) { - return geyser.connectionByName(username); + for (GeyserSession gSess : geyser.getSessionManager().getAllSessions()) { + if (username.equals(gSess.getClientData().getUsername())) { + return gSess; + } + } + return null; } @Override