The nohup (abbreviated from it's purpose: "No Hang UP") command is your friend, if you want to run commands and then log out.
and then log out, and the script will keep running. (Or you can use this for any other long running command.)
Another option is the screen utility.
If you run
from the command line, then after the obligatory informational messages (just press return to end), you'll be given a perfectly normal prompt. Run
as you normally would, and then, enter ctrl-A D (ie. hold down control. type A, release control, type D) to disconnect from screen, and get back to your normal prompt where you can log out. Once you've disconnected from screen, you can reconnect
to it by invoking
, and you'll be back in your previous session, which will have been merrily running in your absence, but any output will have scrolled up the screen, and you'll be able to see exactly what's going on. Again, great for long running commands, where there's some degree of interaction (eg. it's actually an editor session, or you want to be able to see progress logs scrolling past).
Figuring out how to make it autostart when you boot the pi may be a better solution, depending on whether it's a dedicated minecraft server, or whether you only want to run it when it's convenient for you. It's certainly got the advantage that, once you've done it, you won't have to worry about it again