mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-25 01:33:08 +08:00
Initialize ServerHook
This commit is contained in:
parent
2c3c5937d3
commit
765f569e55
@ -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 {
|
|||||||
// 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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user