/// <summary> /// Registers the plugin events. /// </summary> private void RegisterEvents() { server = new Handlers.Server(); player = new Handlers.Player(); warhead = new Handlers.Warhead(); map = new Handlers.Map(); item = new Handlers.Item(); Events.Handlers.Server.WaitingForPlayers += server.OnWaitingForPlayers; Events.Handlers.Server.EndingRound += server.OnEndingRound; Events.Handlers.Player.Died += player.OnDied; Events.Handlers.Player.ChangingRole += player.OnChangingRole; Events.Handlers.Player.ChangingItem += player.OnChangingItem; Events.Handlers.Player.Verified += player.OnVerified; Events.Handlers.Player.FailingEscapePocketDimension += player.OnFailingEscapePocketDimension; Events.Handlers.Player.EscapingPocketDimension += player.OnEscapingPocketDimension; Events.Handlers.Player.UnlockingGenerator += player.OnUnlockingGenerator; Events.Handlers.Warhead.Stopping += warhead.OnStopping; Events.Handlers.Warhead.Starting += warhead.OnStarting; Events.Handlers.Scp106.Teleporting += player.OnTeleporting; Events.Handlers.Scp106.Containing += player.OnContaining; Events.Handlers.Scp106.CreatingPortal += player.OnCreatingPortal; Events.Handlers.Scp914.Activating += player.OnActivating; Events.Handlers.Scp914.ChangingKnobSetting += player.OnChangingKnobSetting; Events.Handlers.Map.ExplodingGrenade += map.OnExplodingGrenade; Events.Handlers.Item.ChangingDurability += item.OnChangingDurability; Events.Handlers.Item.ChangingAttachments += item.OnChangingAttachments; }
/// <summary> /// Unregisters the plugin events. /// </summary> private void UnregisterEvents() { Events.Handlers.Server.WaitingForPlayers -= server.OnWaitingForPlayers; Events.Handlers.Server.EndingRound -= server.OnEndingRound; Events.Handlers.Player.Died -= player.OnDied; Events.Handlers.Player.ChangingRole -= player.OnChangingRole; Events.Handlers.Player.ChangingItem -= player.OnChangingItem; Events.Handlers.Player.Verified -= player.OnVerified; Events.Handlers.Player.FailingEscapePocketDimension -= player.OnFailingEscapePocketDimension; Events.Handlers.Player.EscapingPocketDimension -= player.OnEscapingPocketDimension; Events.Handlers.Player.UnlockingGenerator -= player.OnUnlockingGenerator; Events.Handlers.Warhead.Stopping -= warhead.OnStopping; Events.Handlers.Warhead.Starting -= warhead.OnStarting; Events.Handlers.Scp106.Teleporting -= player.OnTeleporting; Events.Handlers.Scp106.Containing -= player.OnContaining; Events.Handlers.Scp106.CreatingPortal -= player.OnCreatingPortal; Events.Handlers.Scp914.Activating -= player.OnActivating; Events.Handlers.Scp914.ChangingKnobSetting -= player.OnChangingKnobSetting; Events.Handlers.Map.ExplodingGrenade -= map.OnExplodingGrenade; Events.Handlers.Item.ChangingDurability -= item.OnChangingDurability; Events.Handlers.Item.ChangingAttachments -= item.OnChangingAttachments; server = null; player = null; warhead = null; map = null; item = null; }