Beispiel #1
0
 public override void Initialize()
 {
     ServerApi.Hooks.NetGreetPlayer.Register(this, OnGreet);
     ServerApi.Hooks.ServerLeave.Register(this, OnLeave);
     PlayerHooks.PlayerPostLogin  += OnLogin;
     GetDataHandlers.PlayerUpdate += OnPlayerUpdate;
     GeneralHooks.ReloadEvent     += OnReload;
     Commands.ChatCommands.Add(new Command(BTPermissions.BTool, BindToolCMD, "bindtool", "bt")
     {
         AllowServer = false,
         HelpText    = string.Format("Use '{0}bt help'.", TShock.Config.CommandSpecifier)
     });
     Commands.ChatCommands.Add(new Command(BTPermissions.BWait, BindWaitCMD, "bindwait", "bw")
     {
         AllowServer = false,
         HelpText    = string.Format("Use '{0}bw help'.", TShock.Config.CommandSpecifier)
     });
     Commands.ChatCommands.Add(new Command(BTPermissions.BGlobal, BindGlobalCMD, "bindglobal", "bgl")
     {
         HelpText = string.Format("Use '{0}bgl help'.", TShock.Config.CommandSpecifier)
     });
     Commands.ChatCommands.Add(new Command(BTPermissions.BPrefix, BindPrefixCMD, "bprefix", "bindprefix", "bpr")
     {
         AllowServer = false,
         HelpText    = string.Format("Use '{0}bgl help'.", TShock.Config.CommandSpecifier)
     });
     BTDatabase.DBConnect();
 }
Beispiel #2
0
 public override void Initialize()
 {
     ServerApi.Hooks.NetGreetPlayer.Register(this, OnGreet);
     ServerApi.Hooks.ServerLeave.Register(this, OnLeave);
     PlayerHooks.PlayerPostLogin  += OnLogin;
     GetDataHandlers.PlayerUpdate += OnPlayerUpdate;
     Commands.ChatCommands.Add(new Command("bindtool", BindToolCMD, "bindtool", "bt")
     {
         AllowServer = false,
         HelpText    = string.Format("Use '{0}bindtool help'.", TShock.Config.CommandSpecifier)
     });
     Commands.ChatCommands.Add(new Command("bindwait", BindWaitCMD, "bindwait", "bw")
     {
         AllowServer = false,
         HelpText    = string.Format("Use '{0}bindwait help'.", TShock.Config.CommandSpecifier)
     });
     BTDatabase.DBConnect();
 }