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 OnUnload() { Level.onPostLevelLoaded -= onPostLevelLoaded; CommandManager.UnregisterAll(CommandsNamespace); EventManager.UnregisterAll <KitEventHandler>(); KitManager.Save(); }
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>(); }
public override void OnUnload() { CommandManager.UnregisterAll(CommandsNamespace); EventManager.UnregisterAll <KitEventHandler>(); KitManager.Save(); }
public void onPostLevelLoaded(int level) { KitManager.Load(); Logger.LogInfo($"Loaded {KitManager.Count} kits"); }
public override void OnUnload() { CommandManager.UnregisterAll("Essentials.NativeModules.Kit.Commands"); KitManager.Save(); }