예제 #1
0
 public void OnShutdown()
 {
     if (!this.IsShuttingDown)
     {
         this.libperm.SaveData();
         this.IsShuttingDown = true;
         this.UnloadAllPlugins(null);
         foreach (Extension allExtension in this.extensionManager.GetAllExtensions())
         {
             allExtension.OnShutdown();
         }
         foreach (string library in this.extensionManager.GetLibraries())
         {
             this.extensionManager.GetLibrary(library).Shutdown();
         }
         Oxide.Core.RemoteConsole.RemoteConsole remoteConsole = this.RemoteConsole;
         if (remoteConsole != null)
         {
             remoteConsole.Shutdown("Server shutting down", CloseStatusCode.Normal);
         }
         else
         {
         }
         Oxide.Core.ServerConsole.ServerConsole serverConsole = this.ServerConsole;
         if (serverConsole != null)
         {
             serverConsole.OnDisable();
         }
         else
         {
         }
         this.RootLogger.Shutdown();
     }
 }
예제 #2
0
 public void OnShutdown()
 {
     IsShuttingDown = true;
     UnloadAllPlugins();
     foreach (var extension in extensionmanager.GetAllExtensions())
     {
         extension.OnShutdown();
     }
     ServerConsole?.OnDisable();
 }
예제 #3
0
 public void OnShutdown()
 {
     if (IsShuttingDown)
     {
         return;
     }
     IsShuttingDown = true;
     UnloadAllPlugins();
     foreach (var extension in extensionManager.GetAllExtensions())
     {
         extension.OnShutdown();
     }
     foreach (var name in extensionManager.GetLibraries())
     {
         extensionManager.GetLibrary(name).Shutdown();
     }
     ServerConsole?.OnDisable();
     RootLogger.Shutdown();
 }
예제 #4
0
        /// <summary>
        /// Called when the server is shutting down
        /// </summary>
        public void OnShutdown()
        {
            if (!IsShuttingDown)
            {
                libperm.SaveData();
                IsShuttingDown = true;
                UnloadAllPlugins();

                foreach (Extension extension in extensionManager.GetAllExtensions())
                {
                    extension.OnShutdown();
                }

                foreach (string name in extensionManager.GetLibraries())
                {
                    extensionManager.GetLibrary(name).Shutdown();
                }

                RemoteConsole?.Shutdown();
                ServerConsole?.OnDisable();
                RootLogger.Shutdown();
            }
        }