I am currently running a Minecraft server, and when I leave and rejoin to check if my stuff is still there, it is.
What happens when I close the server? Does it matter if I just use the
xbutton on the window? Is anything lost or does it save before closing?
Everything will be saved and shut down when you close your Minecraft server with the
X button – nothing will be lost. If you want to feel extra safe, however, simply type
stop into the command bar (or
/stop into the chat window) to bring it to a graceful halt.
Source : Link , Question Author : Render , Answer Author : Keaanu