MovingBlocks/Terasology — pull request #1236 by shartte (2014-09-28 11:32:10+00:00)
Title: More Headless Mode Fixes

1) InitialiseWorld created the Chunk Storage before resolving the World Generator. If the World Generator could not be resolved, the chunk storage was never properly disposed, leading to threads still running in the background and the server never shutting down.
2) Some initialisation stages return to the main menu (via changing state to the main menu state). Since the headless server does not have a main menu, this should actually shut the server down. Implemented this using a StateChangeListener that forces the server to shut down whenever it changes to the main menu state in headless mode.

Also fixes:
3) World-Gen is called multiple times if Wold Generator could not be resolved

Improves:
4) When the configured world-gen is unknown, a list of registered world generators is printed.

Possibly fixes #1233