In the example the output of the minecraft server is send to nohup.out file in the directory the file is being executed by using nohup. The & at the end causes the shell to execute the command in the background subshell. The shell does not wait for the command to finish and the return status is 0.

nohup java -Xms1024M -Xmx2048M -jar minecraft_server.jar nogui &