mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-13 22:04:36 +01:00
Skip loading resources if we are not running the game server
This commit is contained in:
@@ -69,21 +69,25 @@ public class LunarRail {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load resources
|
// Skip these if we are only running the http server in dispatch mode
|
||||||
ResourceLoader.loadAll();
|
if (serverType.runGame()) {
|
||||||
|
// Load resources
|
||||||
|
ResourceLoader.loadAll();
|
||||||
|
|
||||||
// Build handbook
|
// Build handbook
|
||||||
if (generateHandbook) {
|
if (generateHandbook) {
|
||||||
Handbook.generate();
|
Handbook.generate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start Database(s)
|
// Start Database(s)
|
||||||
LunarRail.initDatabases();
|
LunarRail.initDatabases();
|
||||||
|
|
||||||
// Start Servers TODO
|
// Always run http server as it is needed by for dispatch and gateserver
|
||||||
httpServer = new HttpServer(serverType);
|
httpServer = new HttpServer(serverType);
|
||||||
httpServer.start();
|
httpServer.start();
|
||||||
|
|
||||||
|
// Start game server
|
||||||
if (serverType.runGame()) {
|
if (serverType.runGame()) {
|
||||||
gameServer = new GameServer(getConfig().getGameServer());
|
gameServer = new GameServer(getConfig().getGameServer());
|
||||||
gameServer.start();
|
gameServer.start();
|
||||||
|
|||||||
Reference in New Issue
Block a user