private void registerEvents() { server = new Handlers.Server(this); player = new Handlers.Player(this); Exiled.Events.Handlers.Server.RoundStarted += server.OnRoundStarted; Exiled.Events.Handlers.Server.RoundEnded += server.OnRoundEnd; Exiled.Events.Handlers.Server.WaitingForPlayers += server.OnWaitingForPlayers; Exiled.Events.Handlers.Player.TriggeringTesla += player.OnTriggerTesla; }
private void unRegisterEvents() { Exiled.Events.Handlers.Server.RoundStarted -= server.OnRoundStarted; Exiled.Events.Handlers.Server.RoundEnded -= server.OnRoundEnd; Exiled.Events.Handlers.Server.WaitingForPlayers -= server.OnWaitingForPlayers; Exiled.Events.Handlers.Player.TriggeringTesla -= player.OnTriggerTesla; server = null; player = null; }