示例#1
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();
        }
示例#2
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();
        }