/// <summary> /// Disables a plugin by name. Currently unused in core /// </summary> /// <param name="name">Name of plugin</param> /// <returns>Returns true on plugin successfully Disabling</returns> public static bool DisablePlugin(string name) { lock (_plugins) { string cleanedName = name.ToLower().Trim(); if (_plugins.ContainsKey(cleanedName)) { BasePlugin plugin = _plugins[cleanedName]; plugin.Disable(); return(true); } return(false); } }
/// <summary> /// Enables a plugin. /// </summary> /// <param name="name">Plugin name</param> /// <returns>Returns true on plugin successfully Enabling</returns> public static bool DisablePlugin(BasePlugin plugin) { return(plugin.Disable()); }