public override void Initialize() { HTools.SetupConfig(); GameHooks.Initialize += OnInitialize; GameHooks.Update += OnUpdate; ServerHooks.Chat += OnChat; NetHooks.GreetPlayer += OnGreetPlayer; ServerHooks.Leave += OnLeave; NetHooks.GetData += GetData; GetDataHandlers.InitGetDataHandler(); }
public override void Initialize() { HConfigFile.ForceLoad(); ServerApi.Hooks.GameInitialize.Register(this, OnInitialize, -5); ServerApi.Hooks.ServerChat.Register(this, OnChat, 5); ServerApi.Hooks.NetGreetPlayer.Register(this, OnGreetPlayer, -5); ServerApi.Hooks.ServerLeave.Register(this, OnLeave, 5); ServerApi.Hooks.NetGetData.Register(this, GetData, 10); ServerApi.Hooks.GamePostInitialize.Register(this, PostInitialize, -5); GetDataHandlers.InitGetDataHandler(); if (!HConfig.DisableUpdateTimer) { Update.Elapsed += OnUpdate; Update.Start(); URunning = true; } }