From 765f569e557db598fff83f90b9417201fec1aa79 Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Mon, 2 May 2022 21:20:24 -0400 Subject: [PATCH] Initialize `ServerHook` --- src/main/java/emu/grasscutter/Grasscutter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/emu/grasscutter/Grasscutter.java b/src/main/java/emu/grasscutter/Grasscutter.java index 91dea7647..b0b2227eb 100644 --- a/src/main/java/emu/grasscutter/Grasscutter.java +++ b/src/main/java/emu/grasscutter/Grasscutter.java @@ -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) {