public static void Run(bool doorstop = false)
 {
     try
     {
         _Run(doorstop);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
         ValheimModManager.OpenUnityFileLog();
     }
 }
        private static void _Run(bool doorstop)
        {
            Console.WriteLine();
            Console.WriteLine();
            ValheimModManager.Logger.Log("Injection...");

            if (!ValheimModManager.Initialize())
            {
                ValheimModManager.Logger.Log($"Cancel start due to an error.");
                ValheimModManager.OpenUnityFileLog();
                return;
            }

            Fixes.Apply();

            if (!string.IsNullOrEmpty(ValheimModManager.Config.StartingPoint))
            {
                if (!doorstop && ValheimModManager.Config.StartingPoint == ValheimModManager.Config.EntryPoint)
                {
                    ValheimModManager.Start();
                }
                else
                {
                    if (TryGetEntryPoint(ValheimModManager.Config.StartingPoint, out var @class, out var method, out var place))
                    {
                        var usePrefix = (place == "before");
                        var harmony   = new HarmonyLib.Harmony(nameof(ValheimModManager));
                        var prefix    = typeof(Injector).GetMethod(nameof(Prefix_Start), BindingFlags.Static | BindingFlags.NonPublic);
                        var postfix   = typeof(Injector).GetMethod(nameof(Postfix_Start), BindingFlags.Static | BindingFlags.NonPublic);
                        harmony.Patch(method, usePrefix ? new HarmonyMethod(prefix) : null, !usePrefix ? new HarmonyMethod(postfix) : null);
                        ValheimModManager.Logger.Log("Injection successful.");
                    }
                    else
                    {
                        ValheimModManager.Logger.Log("Injection canceled.");
                        ValheimModManager.OpenUnityFileLog();
                        return;
                    }
                }