切换翻译贡献翻译
  • 正在准备搜索索引...
  • 搜索索引不可用
@minecraft
  • @minecraft
  • server-editor
  • registerEditorExtension

函数 registerEditorExtension

  • registerEditorExtension<PerPlayerStorageType = Record<string, never>>(
        extensionName: string,
        activationFunction: ActivationFunctionType<PerPlayerStorageType>,
        shutdownFunction: ShutdownFunctionType<PerPlayerStorageType>,
        options?: IRegisterExtensionOptionalParameters,
    ): Extension
  • 实验性

    类型参数

    • PerPlayerStorageType = Record<string, never>

    参数

    • extensionName: string
    • activationFunction: ActivationFunctionType<PerPlayerStorageType>
    • shutdownFunction: ShutdownFunctionType<PerPlayerStorageType>
    • 可选options: IRegisterExtensionOptionalParameters

    返回 Extension

    备注

    Registers an editor extension into Minecraft. This function calls underlying functionality to register an extension but provides helpful and contextual wrappers for individual client lifetimes. The onActivation function is called whenever a client joins a session, while the shutdown is called when a client leaves. There may be other circumstances in which these are called as well based on client state that is an implementation detail of the system.

    • 定义于 @minecraft/server-editor.d.ts:7396

显示设置

成员可见性
切换翻译贡献翻译
@minecraft
  • 加载中……

使用 TypeDoc 生成