public override void OnEnabled() { base.OnEnabled(); instance = this; PLEV = new PluginEvents(this); Exiled.Events.Handlers.Server.RoundStarted += PLEV.RoundStart; Exiled.Events.Handlers.Server.WaitingForPlayers += PLEV.Waiting; Exiled.Events.Handlers.Player.DroppingItem += PLEV.PlayerDropItem; Exiled.Events.Handlers.Player.Died += PLEV.PlayerDied; Exiled.Events.Handlers.Player.PickingUpItem += PLEV.PlayerPickupItem; Exiled.Events.Handlers.Player.InteractingDoor += PLEV.PlayerDoorInteract; Exiled.Events.Handlers.Server.RespawningTeam += PLEV.RespawnTeam; Exiled.Events.Handlers.Server.EndingRound += PLEV.EndRoundCheck; Exiled.Events.Handlers.Player.InteractingElevator += PLEV.PlayerElevatorInteract; Exiled.Events.Handlers.Player.ChangingRole += PLEV.PlayerRoleChange; }
public override void OnDisabled() { base.OnDisabled(); Exiled.Events.Handlers.Server.RoundStarted -= PLEV.RoundStart; Exiled.Events.Handlers.Server.WaitingForPlayers -= PLEV.Waiting; Exiled.Events.Handlers.Player.DroppingItem -= PLEV.PlayerDropItem; Exiled.Events.Handlers.Player.Died -= PLEV.PlayerDied; Exiled.Events.Handlers.Player.PickingUpItem -= PLEV.PlayerPickupItem; Exiled.Events.Handlers.Player.InteractingDoor -= PLEV.PlayerDoorInteract; Exiled.Events.Handlers.Server.RespawningTeam -= PLEV.RespawnTeam; Exiled.Events.Handlers.Server.EndingRound -= PLEV.EndRoundCheck; Exiled.Events.Handlers.Player.InteractingElevator -= PLEV.PlayerElevatorInteract; Exiled.Events.Handlers.Player.ChangingRole -= PLEV.PlayerRoleChange; PLEV = null; instance = null; }
public PluginEvents(PluginMain main) { plugin = main; }