Disable saved logins to prevent issues

This commit is contained in:
rtm516 2023-04-25 23:18:38 +01:00
parent 3cadfe5306
commit bcf635d3bb
No known key found for this signature in database
GPG key ID: 331715B8B007C67A

View file

@ -59,6 +59,12 @@ public class GeyserConnect implements Extension {
@Subscribe @Subscribe
public void onSessionInitialize(SessionInitializeEvent event) { public void onSessionInitialize(SessionInitializeEvent event) {
GeyserSession session = (GeyserSession) event.connection(); GeyserSession session = (GeyserSession) event.connection();
// Remove all saved logins to prevent issues connecting
// Maybe worth adding support for this later
session.getGeyser().getConfig().getSavedUserLogins().clear();
// Change the packet handler to our own
BedrockPacketHandler packetHandler = session.getUpstream().getSession().getPacketHandler(); BedrockPacketHandler packetHandler = session.getUpstream().getSession().getPacketHandler();
session.getUpstream().getSession().setPacketHandler(new PacketHandler(this, session, packetHandler)); session.getUpstream().getSession().setPacketHandler(new PacketHandler(this, session, packetHandler));
} }