Esempio n. 1
0
        public override void Initialize()
        {
            ServerApi.Hooks.NetGetData.Register(this, GetData);
            ServerApi.Hooks.NetGreetPlayer.Register(this, GreetPlayer);
            ServerApi.Hooks.ServerLeave.Register(this, PlayerLeave);
            ServerApi.Hooks.GameInitialize.Register(this, OnInitialize);
            ServerApi.Hooks.GamePostInitialize.Register(this, OnGameInitialize);

            PlayerHooks.PlayerPostLogin += PlayerPostLogin;

            GetDataHandlers.InitGetDataHandler();

            _counter.Elapsed += CounterOnElapsed;
            _counter.Start();
            _timeSaver.Elapsed += TimeSaverOnElapsed;
            _timeSaver.Start();

            TShockAPI.Commands.ChatCommands.Add(new Command("statistics.root", Commands.Core, "stats")
            {
                AllowServer = true
            });
            TShockAPI.Commands.ChatCommands.Add(new Command("statistics.blitzevent", Commands.BlitzMatch, "blitzevent", "be")
            {
                AllowServer = true
            });
            TShockAPI.Commands.ChatCommands.Add(new Command("statistics.speedspree", Commands.SpeedSpree, "speedspree", "ss")
            {
                AllowServer = true
            });
        }
Esempio n. 2
0
        public override void Initialize()
        {
            ServerApi.Hooks.GameInitialize.Register(this, OnInitialize);
            ServerApi.Hooks.NetGreetPlayer.Register(this, OnGreet);
            ServerApi.Hooks.ServerLeave.Register(this, OnLeave);
            ServerApi.Hooks.GamePostInitialize.Register(this, PostInitialize);
            ServerApi.Hooks.ServerChat.Register(this, OnChat);
            ServerApi.Hooks.NetGetData.Register(this, GetData);
            TShockAPI.Hooks.PlayerHooks.PlayerPostLogin += PostLogin;

            GetDataHandlers.InitGetDataHandler();
        }
Esempio n. 3
0
        public override void Initialize()
        {
            ServerApi.Hooks.NetGetData.Register(this, GetData);
            ServerApi.Hooks.NetGreetPlayer.Register(this, GreetPlayer);
            ServerApi.Hooks.ServerLeave.Register(this, PlayerLeave);
            ServerApi.Hooks.GameInitialize.Register(this, OnInitialize);

            PlayerHooks.PlayerPostLogin += PlayerPostLogin;

            GetDataHandlers.InitGetDataHandler();

            _counter.Elapsed += CounterOnElapsed;
            _counter.Start();
            _timeSaver.Elapsed += TimeSaverOnElapsed;
            _timeSaver.Start();


            TShockAPI.Commands.ChatCommands.Add(new Command("statistics.root", Commands.Core, "info"));
        }