ConnectorServerEventHandler: set default packet handler
This allows disconnect packets to be sent and kick unsupported versions of the game.
@@ -108,6 +108,8 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
public void onSessionCreation(BedrockServerSession bedrockServerSession) {
bedrockServerSession.setLogging(true);
bedrockServerSession.setPacketHandler(new UpstreamPacketHandler(connector, new GeyserSession(connector, bedrockServerSession)));
+ // Set the packet codec to default just in case we need to send disconnect packets.
+ bedrockServerSession.setPacketCodec(BedrockProtocol.DEFAULT_BEDROCK_CODEC);
}
@Override
