public override void Initialize() { C3Tools.SetupConfig(); if (C3Config.CTFEnabled) { GameHooks.Update += CTF.OnUpdate; } if (C3Config.DuelsEnabled) { GameHooks.Update += Duel.OnUpdate; } if (C3Config.OneFlagEnabled) { GameHooks.Update += OneFlagCTF.OnUpdate; } if (C3Config.TeamDeathmatchEnabled) { GameHooks.Update += TDM.OnUpdate; } if (C3Config.MonsterApocalypseEnabled) { GameHooks.Update += Apocalypse.OnUpdate; } if (C3Config.FreeForAllEnabled) { GameHooks.Update += FFA.OnUpdate; } GameHooks.Update += OnUpdate; GameHooks.Initialize += OnInitialize; NetHooks.GreetPlayer += OnGreetPlayer; ServerHooks.Leave += OnLeave; NetHooks.GetData += GetData; GetDataHandlers.InitGetDataHandler(); }
public override void Initialize() { C3Tools.SetupConfig(); if (C3Config.CTFEnabled) { ServerApi.Hooks.GameUpdate.Register(this, CTF.OnUpdate); } if (C3Config.DuelsEnabled) { ServerApi.Hooks.GameUpdate.Register(this, Duel.OnUpdate); } if (C3Config.OneFlagEnabled) { ServerApi.Hooks.GameUpdate.Register(this, OneFlagCTF.OnUpdate); } if (C3Config.TeamDeathmatchEnabled) { ServerApi.Hooks.GameUpdate.Register(this, TDM.OnUpdate); } if (C3Config.MonsterApocalypseEnabled) { ServerApi.Hooks.GameUpdate.Register(this, Apocalypse.OnUpdate); } if (C3Config.FreeForAllEnabled) { ServerApi.Hooks.GameUpdate.Register(this, FFA.OnUpdate); } ServerApi.Hooks.GameUpdate.Register(this, OnUpdate); ServerApi.Hooks.GameInitialize.Register(this, OnInitialize); ServerApi.Hooks.NetGreetPlayer.Register(this, OnGreetPlayer); ServerApi.Hooks.ServerLeave.Register(this, OnLeave); ServerApi.Hooks.NetGetData.Register(this, GetData); GetDataHandlers.InitGetDataHandler(); }