Пример #1
0
        public override void OnUnload()
        {
            WarpManager.Save();

            CommandManager.Unregister <CommandWarp>();
            CommandManager.Unregister <CommandWarps>();
            CommandManager.Unregister <CommandSetWarp>();
            CommandManager.Unregister <CommandDelWarp>();
        }
Пример #2
0
        public override void OnLoad()
        {
            Instance = this;

            WarpManager = new WarpManager();
            WarpManager.Load();

            Logger.LogInfo($"Loaded {WarpManager.Count} warps");

            CommandManager.Register <CommandWarp>();
            CommandManager.Register <CommandWarps>();
            CommandManager.Register <CommandSetWarp>();
            CommandManager.Register <CommandDelWarp>();

            Tasks.New(t => {
                WarpManager.Save();
            }).Delay(60 * 1000).Interval(60 * 1000).Go();
        }
Пример #3
0
        public override void OnLoad()
        {
            Instance = this;

            WarpManager = new WarpManager();
            WarpManager.Load();

            Logger.LogInfo($"Loaded {WarpManager.Count} warps");

            CommandManager.RegisterAll(kCommandsNamespace);
            EventManager.RegisterAll <WarpEventHandler>();

            Task.Create()
            .Id("Warp Auto-Save")
            .Interval(kAutoSaveInterval)
            .UseIntervalAsDelay()
            .Action(WarpManager.Save)
            .Submit();
        }
Пример #4
0
 public override void OnUnload()
 {
     WarpManager.Save();
     EventManager.UnregisterAll <WarpEventHandler>();
     CommandManager.UnregisterAll(kCommandsNamespace);
 }