Exemplo n.º 1
0
		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!");
		}
Exemplo n.º 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();
		}
Exemplo n.º 3
0
 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!");
 }
Exemplo n.º 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"));
        }
Exemplo n.º 7
0
 private void OnReload(ReloadEventArgs args)
 {
     config.ReadFile(path);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 10
0
 private void OnReload(ReloadEventArgs args)
 {
     Database.LoadDatabase();
 }
Exemplo n.º 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());
 }
Exemplo n.º 14
0
		private static void onReload(ReloadEventArgs args)
		{
			SetUpConfig();
			TShock.Log.Info("Reloaded PvPToggle config.");
		}