Is it safe to close Minecraft's multiplayer server?

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 x button 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.


This is a very old question but I will answer to avoid anyone making the same mistake I did: DON'T just close your Minecraft server with the x button, you might lose the the last changes you made to your world. Minecraft's server has an autosave feature that triggers once in a while, if you just kill the server process you might lose the last changes. ALWAYS use the /stop command before quitting the server.