Commit 765f569e authored by KingRainbow44's avatar KingRainbow44
Browse files

Initialize `ServerHook`

parent 2c3c5937
...@@ -10,6 +10,7 @@ import java.util.Calendar; ...@@ -10,6 +10,7 @@ import java.util.Calendar;
import emu.grasscutter.command.CommandMap; import emu.grasscutter.command.CommandMap;
import emu.grasscutter.plugin.PluginManager; import emu.grasscutter.plugin.PluginManager;
import emu.grasscutter.plugin.api.ServerHook;
import emu.grasscutter.scripts.ScriptLoader; import emu.grasscutter.scripts.ScriptLoader;
import emu.grasscutter.utils.Utils; import emu.grasscutter.utils.Utils;
import org.reflections.Reflections; import org.reflections.Reflections;
...@@ -83,6 +84,8 @@ public final class Grasscutter { ...@@ -83,6 +84,8 @@ public final class Grasscutter {
// Create server instances. // Create server instances.
dispatchServer = new DispatchServer(); dispatchServer = new DispatchServer();
gameServer = new GameServer(new InetSocketAddress(getConfig().getGameServerOptions().Ip, getConfig().getGameServerOptions().Port)); gameServer = new GameServer(new InetSocketAddress(getConfig().getGameServerOptions().Ip, getConfig().getGameServerOptions().Port));
// Create a server hook instance with both servers.
new ServerHook(gameServer, dispatchServer);
// Start servers. // Start servers.
if (getConfig().RunMode == ServerRunMode.HYBRID) { if (getConfig().RunMode == ServerRunMode.HYBRID) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment