In general, the third cohomology of a Lie algebra $\mathfrak{g}$ with values in the Lie algebra itself, $H^3(\mathfrak{g},\mathfrak{g})$, contains obstructions to deformations of the Lie algebra.
Does the third cohomology with values in the base field $\mathbb{K}$, i.e. $H^3(\mathfrak{g},\mathbb{K})$, contain obstructions to central extensions? If yes, how can one see this?