Ejemplo n.º 1
0
        public override void OnLoad()
        {
            Instance = this;

            KitManager = new KitManager();

            Logger.LogInfo("Waiting assets to load kits");

            // Must load kits only when Assets is loaded.
            Task.Create()
            .Action(t => {
                if (!Assets.isLoading)
                {
                    KitManager.Load();
                    Logger.LogInfo($"Loaded {KitManager.Count} kits");
                    t.Cancel();
                }
            })
            .Delay(600)
            .Interval(200)
            .Submit();

            CommandManager.RegisterAll(kCommandsNamespace);
            EventManager.RegisterAll <KitEventHandler>();
        }
Ejemplo n.º 2
0
        public override void OnLoad()
        {
            Instance = this;

            KitManager = new KitManager();
            KitManager.Load();

            Logger.LogInfo($"Loaded {KitManager.Count} kits");

            CommandManager.RegisterAll("Essentials.NativeModules.Kit.Commands");
        }
Ejemplo n.º 3
0
        public override void OnLoad()
        {
            Instance = this;

            KitManager = new KitManager();
            KitManager.Load();

            Logger.LogInfo($"Loaded {KitManager.Count} kits");

            CommandManager.RegisterAll(CommandsNamespace);
            EventManager.RegisterAll <KitEventHandler>();
        }
Ejemplo n.º 4
0
        public override void OnLoad()
        {
            Instance = this;

            KitManager = new KitManager();

            Level.onPostLevelLoaded += Instance.onPostLevelLoaded;
            if (Level.isLoaded)
            {
                onPostLevelLoaded(420);
            }

            CommandManager.RegisterAll(CommandsNamespace);
            EventManager.RegisterAll <KitEventHandler>();
        }