Ejemplo n.º 1
0
    private void CmdReloadSigns(CommandArgs args) {
      var savePath = Path.Combine(TShock.SavePath, "Essentials");
      if (!Directory.Exists(savePath))
        Directory.CreateDirectory(savePath);
      var configPath = Path.Combine(savePath, "scConfig.json");
      (config = ScConfig.Read(configPath)).Write(configPath);

      args.Player.SendSuccessMessage("Sign Commands config has been reloaded.");
    }
Ejemplo n.º 2
0
    private void OnInitialize(EventArgs args) {
      Commands.ChatCommands.Add(new Command("essentials.signs.break", CmdDestroySign, "destroysign", "dsign"));
      Commands.ChatCommands.Add(new Command("essentials.signs.reload", CmdReloadSigns, "screload"));

      var savePath = Path.Combine(TShock.SavePath, "Essentials");
      if (!Directory.Exists(savePath))
        Directory.CreateDirectory(savePath);
      var configPath = Path.Combine(savePath, "scConfig.json");
      (config = ScConfig.Read(configPath)).Write(configPath);

      _updateTimer.Elapsed += UpdateTimerOnElapsed;
    }
Ejemplo n.º 3
0
        private void OnInitialize(EventArgs args)
        {
            Commands.ChatCommands.Add(new Command("essentials.signs.break", CmdDestroySign, "destroysign", "dsign"));
              Commands.ChatCommands.Add(new Command("essentials.signs.reload", CmdReloadSigns, "screload"));

              var savePath = Path.Combine(TShock.SavePath, "Essentials");
              if (!Directory.Exists(savePath))
            Directory.CreateDirectory(savePath);
              var configPath = Path.Combine(savePath, "scConfig.json");
              (config = ScConfig.Read(configPath)).Write(configPath);

              _updateTimer.Elapsed += UpdateTimerOnElapsed;
        }
Ejemplo n.º 4
0
        private void CmdReloadSigns(CommandArgs args)
        {
            var savePath = Path.Combine(TShock.SavePath, "Essentials");
              if (!Directory.Exists(savePath))
            Directory.CreateDirectory(savePath);
              var configPath = Path.Combine(savePath, "scConfig.json");
              (config = ScConfig.Read(configPath)).Write(configPath);

              args.Player.SendSuccessMessage("Sign Commands config has been reloaded.");
        }