private async void OnReload(ReloadEventArgs e)
		{
			string path = Path.Combine(TShock.SavePath, "essentials.json");
			Config = Config.Read(path);
			if (!File.Exists(path))
			{
				Config.Write(path);
			}
			await Homes.ReloadAsync();
			e.Player.SendSuccessMessage("[EssentialsPlus] Reloaded config and homes!");
		}
Beispiel #2
0
		void OnReload(ReloadEventArgs e)
		{
			string path = Path.Combine(TShock.SavePath, "CTRSystem", "CTRS-Config.json");
			Config = Configuration.ConfigFile.Read(path);

			if ((Config.TierRefreshMinutes * 60 * 1000) != _tierUpdateTimer.Interval)
			{
				_tierUpdateTimer.Interval = (Config.TierRefreshMinutes * 60 * 1000);
			}

			// Refresh tier data
			Tiers.Refresh();
		}
 private void OnReload(ReloadEventArgs args)
 {
     loadConfig();
     readDatabase();
 }
 public void OnReload(ReloadEventArgs args)
 {
     string path = Path.Combine(TShock.SavePath, "AccountRecovery.json");
     Config = Config.Read(path);
     if (!File.Exists(path))
     {
         Config.Write(path);
     }
     args.Player.SendSuccessMessage("[Account Recovery] Reloaded configuration file and data!");
 }
Beispiel #5
0
 private void OnReload(ReloadEventArgs args)
 {
     regions.Clear();
     Import(new EventArgs());
 }
        private void OnReload(ReloadEventArgs args)
        {
            loadDatabase();

              if (File.Exists(Path.Combine(TShock.SavePath, "USF.json")))
            Config = Config.Read(Path.Combine(TShock.SavePath, "USF.json"));
              Config.Write(Path.Combine(TShock.SavePath, "USF.json"));
        }
 private void OnReload(ReloadEventArgs args)
 {
     config.ReadFile(path);
 }
Beispiel #8
0
 private void OnReload(ReloadEventArgs e)
 {
     string path = Path.Combine(TShock.SavePath, "LocalChat.json");
     if (!File.Exists(path))
     {
         config.Write(path);
     }
     config.Read(path);
 }
Beispiel #9
0
        private void OnReload(ReloadEventArgs e)
        {
            try
            {
                var configPath = Path.Combine(TShock.SavePath, "EventStop.json");
                if (!File.Exists(configPath))
                {
                    Config.Write(configPath);
                }
                Config = Config.Read(configPath);

                e.Player.SendSuccessMessage("Reloaded event stopper plugin's configuration");
            }
            catch (Exception x)
            {
                TShock.Log.ConsoleError("Error occured on reloading event stopper plugin's configuration");
                TShock.Log.ConsoleError(x.ToString());
                e.Player.SendErrorMessage("Error occured on reloading event stopper plugin's configuration");
                e.Player.SendErrorMessage(x.Message);
            }
        }
Beispiel #10
0
 private void OnReload(ReloadEventArgs args)
 {
     Database.LoadDatabase();
 }
Beispiel #11
0
 private void OnReload(ReloadEventArgs e)
 {
     if (!File.Exists(path))
     {
         config.Write(path);
     }
     config.Read(path);
 }
		private void OnReload(ReloadEventArgs args)
		{
			LoadConfig();
			Database.LoadDatabase();
		}
 /// <summary>
 /// Internal hook, fired whenever a player executes /reload.
 /// </summary>
 /// <param name="args">The <see cref="ReloadEventArgs"/> object.</param>
 private void OnReload(ReloadEventArgs args)
 {
     LoadConfig();
     Task.Run(() => USFDatabase.LoadPlayerData());
 }
Beispiel #14
0
		private static void onReload(ReloadEventArgs args)
		{
			SetUpConfig();
			TShock.Log.Info("Reloaded PvPToggle config.");
		}