类型别名 IPlayerUISession<PerPlayerStorage>实验性

IPlayerUISession<PerPlayerStorage>: {
    actionBar: IActionBar;
    actionManager: ActionManager;
    builtInUIManager: BuiltInUIManager;
    eventSubscriptionCache: BedrockEventSubscriptionCache;
    extensionContext: ExtensionContext;
    inputManager: IGlobalInputManager;
    log: IPlayerLogger;
    menuBar: IMenuContainer;
    scratchStorage: PerPlayerStorage | undefined;
    statusBar: IStatusBar;
    toolRail: IModalToolContainer;
    createPropertyPane(options: IRootPropertyPaneOptions): IRootPropertyPane;
}

The IPlayerUISession represents the editor user interface for a given player and given extension. Extensions registered with Minecraft are instantiated for each player which joins a server, and this interface provides the set of functionality needed to create and modify the editor UI for that player. The associated Editor Context for this session object is also player specific. From a given IPlayerUISession object, there is no way to interact with the UI of another player, that must be done from global extension scope registration and/or data sharing independent of the UI object.

类型参数

  • PerPlayerStorage = Record<string, never>