Skip to main content

publicModSDKGlobalAPI

The global API of the SDK

Accessible using the exported value or as window.bcModSdk

Index

Properties

readonlyapiVersion

apiVersion: number

The API version of the SDK itself. Attempting to load two different SDK versions will fail.

readonlyerrorReporterHooks

errorReporterHooks: { apiEndpointEnter: (fn, mod) => () => void; hookChainExit: (fn, patchMods) => () => void; hookEnter: (fn, mod) => () => void }

Internal API, please DO NOT USE


Type declaration

  • apiEndpointEnter: (fn, mod) => () => void
      • (fn, mod): () => void
      • Parameters

        • fn: string
        • mod: string

        Returns () => void

          • (): void
          • Returns void

  • hookChainExit: (fn, patchMods) => () => void
      • (fn, patchMods): () => void
      • Parameters

        • fn: string
        • patchMods: ReadonlySet<string>

        Returns () => void

          • (): void
          • Returns void

  • hookEnter: (fn, mod) => () => void
      • (fn, mod): () => void
      • Parameters

        • fn: string
        • mod: string

        Returns () => void

          • (): void
          • Returns void

readonlyversion

version: string

The version of the SDK itself. Attempting to load two different SDK versions will warn, but work as long as apiVersion is same.

Methods

getModsInfo

getPatchingInfo

registerMod

  • Register a mod, receiving access to the mod API

    @see
    • ModSDKModAPI
    • ModSDKModInfo

    Parameters

    • info: ModSDKModInfo

      Info about the mod, necessary to register the mod

    • optionaloptions: ModSDKModOptions

      [OPTIONAL] Options the mod can specify for ModSDK

    Returns ModSDKModAPI

    The API usable by mod.