/// <summary>
 /// Enables a plugin by name. Currently unused in core
 /// </summary>
 /// <param name="name">Plugin name</param>
 /// <returns>Returns true on plugin successfully Enabling</returns>
 public static bool EnablePlugin(string name)
 {
     lock (_plugins)
     {
         string cleanedName = name.ToLower().Trim();
         if (_plugins.ContainsKey(cleanedName))
         {
             BasePlugin plugin = _plugins[cleanedName];
             plugin.Enable();
             return(true);
         }
         return(false);
     }
 }
        public static void RegisterPlugin(BasePlugin plugin)
        {
            if (!plugin.InitializeAndHookUp())
            {
                Tools.WriteLine("Failed to initialize new plugin instance.", Color.DodgerBlue);
            }

            _plugins.Add(plugin.Name.ToLower().Trim(), plugin);

            if (!plugin.Enable())
            {
                Tools.WriteLine("Failed to enable new plugin instance.", Color.DodgerBlue);
            }
        }
 /// <summary>
 /// Enables a plugin.
 /// </summary>
 /// <param name="name">Plugin name</param>
 /// <returns>Returns true on plugin successfully Enabling</returns>
 public static bool EnablePlugin(BasePlugin plugin)
 {
     return(plugin.Enable());
 }