Let $L$ be a non-abelian nilpotent Lie algebra and $Z(L)$ be its center. Is it possible for $Z(L)$ to be a maximal ideal in $L$?
An attempt: Since $L$ is not abelian then there exists $x\in L, x\notin Z(L)$, now $\langle x\rangle_F + Z(L)$ is an ideal of $L$, by maximality of $Z(L)$ this ideal is $L$. Thus $dim\ L/Z(L)=1$ and the nilpotency class of $L$ is $2$ i.e $[L,[L,L]]=0$ if this implies that $Z(L)=[L,L]$ then we are done. since for a nilpotent Lie algebra $L$ we must have $dim\ L/[L,L]>1$.
Suppose such an $L$. Then $[L,L]+Z(L)$ is an ideal (why is $[L,L]+Z$ not all of $L$? because $[[L,L],L]$ must be strictly smaller than $[L,L]$, since $L$ is nilpotent.. rt?). Since $Z$ is maximal, $[L,L]\subset Z$, but then $Z$ must have codimension one if it is to be maximal. But then $L$ is abelian. contradiction.