Beispiel #1
0
 internal 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);
     PluginLoadEvent.Call(plugin);
     if (cancelload)
     {
         Unload(plugin, false);
         cancelload = false;
         return;
     }
     Logger.LogFormat("Loaded plugin: {0} v{1}", plugin.name, plugin.version);
     Logger.Log(plugin.welcome);
 }
 internal 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);
     PluginLoadEvent.Call(plugin);
     if (cancelload)
     {
         Unload(plugin, false);
         cancelload = false;
         return;
     }
     Logger.LogFormat("Loaded plugin: {0} v{1}", plugin.name, plugin.version);
     Logger.Log(plugin.welcome);
 }