/// <summary> /// Unload the specified p and shutdown. /// </summary> /// <param name='p'> /// P. The plugin object you want to unload /// </param> /// <param name='shutdown'> /// Shutdown. Is the server shutting down? /// </param> public static void Unload(Plugin p, bool shutdown) { p.Unload(shutdown); all.Remove(p); Server.Log(p.name + " was unloaded...how ever you cant re-load it until you restart!"); }
/// <summary> /// Unload the specified p and shutdown. /// </summary> /// <param name='p'> /// P. The plugin object you want to unload /// </param> /// <param name='shutdown'> /// Shutdown. Is the server shutting down? /// </param> public static void Unload(Plugin p, bool shutdown) { p.Unload(shutdown); all.Remove(p); Server.ServerLogger.Log(p.name + " was unloaded."); }
private static void Load(Plugin plugin, bool startup) { if (plugin == null) throw new ArgumentNullException(); if (plugin.ForgeCraft_Version > Server.version) { Logger.LogFormat("Plugin \"{0}\" isn't compatible with this version of ForgeCraft!", plugin.name); if (Server.unsafe_plugin) Logger.Log("Will attempt to load anyways."); else return; } Plugin.all.Add(plugin); plugin.Load(startup); Logger.LogFormat("Loaded plugin: {0} v{1}", plugin.name, plugin.version); Logger.Log(plugin.welcome); }