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(); } }
public bool EnableConsole(bool force = false) { if (!CheckConsole(force)) { return(false); } ServerConsole = new ServerConsole.ServerConsole(); ServerConsole.OnEnable(); return(true); }
public bool EnableConsole(bool force = false) { if (!this.CheckConsole(force)) { return(false); } this.ServerConsole = new Oxide.Core.ServerConsole.ServerConsole(); this.ServerConsole.OnEnable(); return(true); }
public void OnFrame(float delta) { List <Action> actions; if (this.nextTickQueue.Count > 0) { lock (this.nextTickLock) { actions = this.nextTickQueue; this.nextTickQueue = this.lastTickQueue; this.lastTickQueue = actions; } for (int i = 0; i < actions.Count; i++) { try { actions[i](); } catch (Exception exception) { this.LogException("Exception while calling NextTick callback", exception); } } actions.Clear(); } this.libtimer.Update(delta); if (this.isInitialized) { Oxide.Core.ServerConsole.ServerConsole serverConsole = this.ServerConsole; if (serverConsole != null) { serverConsole.Update(); } else { } try { Action <float> action = this.onFrame; if (action != null) { action(delta); } else { } } catch (Exception exception2) { Exception exception1 = exception2; this.LogException(string.Concat(exception1.GetType().Name, " while invoke OnFrame in extensions"), exception1); } } }