Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HookManager

Hierarchy

  • HookManager

Index

Constructors

constructor

Methods

cacheHooks

  • cacheHooks(): void
  • Caches the hooks used by each mod, sorted by priority.

    1. For every valid mod, cache the hooks for that mod using cacheHooksForMod
    2. For all cached hooks, sort the cached list of priorities that all the cached hook methods use.

    Returns void

deregister

  • deregister(host: IHookHost): void
  • deregister(host: IHookHost, name?: undefined | string): void
  • Deregisters the given IHookHost if it is registered.

    Parameters

    Returns void

  • Deregisters the given IHookHost if it is registered under the given name.

    Parameters

    • host: IHookHost
    • Optional name: undefined | string

    Returns void

getCachedHook

  • Returns the internal list of mods with a hook and their priorities.

    see

    Mod or Hook for a list of valid hook names.

    Parameters

    • hook: Hook

      A hook name.

    Returns ICachedHook | undefined

getHostsWithHook

  • getHostsWithHook(hook: Hook): Generator<IHookHost, void, unknown>
  • Parameters

    Returns Generator<IHookHost, void, unknown>

register

  • register<H>(host: H, name?: string): void
  • Type parameters

    Parameters

    • host: H
    • Default value name: string = "Anonymous"

    Returns void

Generated using TypeDoc