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>(); }
public override void OnLoad() { Instance = this; KitManager = new KitManager(); KitManager.Load(); Logger.LogInfo($"Loaded {KitManager.Count} kits"); CommandManager.RegisterAll("Essentials.NativeModules.Kit.Commands"); }
public override void OnLoad() { Instance = this; KitManager = new KitManager(); KitManager.Load(); Logger.LogInfo($"Loaded {KitManager.Count} kits"); CommandManager.RegisterAll(CommandsNamespace); EventManager.RegisterAll <KitEventHandler>(); }
public override void OnLoad() { Instance = this; KitManager = new KitManager(); Level.onPostLevelLoaded += Instance.onPostLevelLoaded; if (Level.isLoaded) { onPostLevelLoaded(420); } CommandManager.RegisterAll(CommandsNamespace); EventManager.RegisterAll <KitEventHandler>(); }