fix the problem that the reference of serverHook in Plugin object is null

This commit is contained in:
Bwly999
2022-05-06 18:16:07 +08:00
parent 93b3265d72
commit 2d325e1847
2 changed files with 22 additions and 16 deletions

View File

@@ -92,14 +92,13 @@ public final class Grasscutter {
// Database
DatabaseManager.initialize();
// Create plugin manager instance.
pluginManager = new PluginManager();
// Create server instances.
dispatchServer = new DispatchServer();
gameServer = new GameServer(new InetSocketAddress(getConfig().getGameServerOptions().Ip, getConfig().getGameServerOptions().Port));
// Create a server hook instance with both servers.
new ServerHook(gameServer, dispatchServer);
// Create plugin manager instance.
pluginManager = new PluginManager();
// Start servers.
if (getConfig().RunMode == ServerRunMode.HYBRID) {