Initialize ServerHook

This commit is contained in:
KingRainbow44 2022-05-02 21:20:24 -04:00
parent 2c3c5937d3
commit 765f569e55

View File

@ -10,6 +10,7 @@ import java.util.Calendar;
import emu.grasscutter.command.CommandMap;
import emu.grasscutter.plugin.PluginManager;
import emu.grasscutter.plugin.api.ServerHook;
import emu.grasscutter.scripts.ScriptLoader;
import emu.grasscutter.utils.Utils;
import org.reflections.Reflections;
@ -83,6 +84,8 @@ public final class Grasscutter {
// 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);
// Start servers.
if (getConfig().RunMode == ServerRunMode.HYBRID) {