Skip to content

Commit

Permalink
Change Geyser AuthType classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
Smart123s committed Sep 26, 2022
1 parent b8ab49b commit 31bc57c
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
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<GeyserSession> {

Expand All @@ -44,7 +44,7 @@ public GeyserService(GeyserImpl geyser, FastLoginCore<?, ?, ?> core) {
super(core);
this.geyser = geyser;
this.core = core;
this.authType = GeyserImpl.getInstance().getConfig().getRemote().getAuthType();
this.authType = GeyserImpl.getInstance().getConfig().getRemote().authType();
}

@Override
Expand All @@ -65,7 +65,12 @@ public boolean performChecks(String username, LoginSource source) {

@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
Expand Down

0 comments on commit 31bc57c

Please sign in to comment.