Пример #1
0
 protected override void Unload()
 {
     Instance = null;
     if (!Instance.Configuration.Instance.Enabled)
     {
         Logger.LogWarning("Unloading plugin...");
         Logger.LogWarning("Plugin unloaded!");
     }
 }
Пример #2
0
 protected override void Load()
 {
     Instance = this;
     if (Instance.Configuration.Instance.Enabled)
     {
         Logger.LogWarning("If the plugin is loaded at the first time, you need to restart your server once.");
         Logger.LogWarning("Checking Announcer...");
         Logger.LogWarning("Checking RemoteAnnouncer...");
         Logger.LogWarning("Checking GodVanishLog...");
         if (Instance.Configuration.Instance.AnnouncerEnabled)
         {
             Logger.LogWarning("Announcer Enabled!");
         }
         else
         {
             Logger.LogWarning("Announcer Disabled");
         }
         if (Instance.Configuration.Instance.RemoteAnnouncerEnabled)
         {
             Logger.LogWarning("RemoteAnnouncer Enabled!");
         }
         else
         {
             Logger.LogWarning("RemoteAnnouncer Disabled");
         }
         if (File.Exists(directory + "/GodVanishLog.txt"))
         {
             Logger.Log(directory + "/GodVanishLog.txt already exists. Loopholing the file...");
         }
         else
         {
             File.CreateText(directory + "/GodVanishLog.txt");
         }
         Logger.LogWarning("Plugin loaded");
         Logger.LogWarning("Plugin fixed by " + Creator);
         Logger.LogWarning("Version: " + Assembly.GetName().Version + "  Support: " + Discord);
     }
     else
     {
         base.UnloadPlugin();
         Logger.LogWarning("The plugin is disabled via the config file!");
     }
 }