Skip to main content

API

Everything below is on the root export.

The app​

The field core.register() takes. Also on @bedrock-core/guides/server, for a bundle that wants the app alone.

ExportKindDescription
registerGuides(options?)functionThe field core.register() takes: installs the command and the show method, announces the guide once the build's pages are in hand, and hands back a Guides
GuidesOptionstype{ commands?: boolean }
Guidestype{ open(player, addonId?) }, what the field hands back
GuidesDeclarationtypeWhat the field hands register(): the installer and app: 'guide'
guidesOf(core)functionThis realm's Guides, or undefined when this addon installed none

The screens​

What the modules the guides filter generates call, and what your own code uses beside them.

ExportKindDescription
guideHomeScreen(manifest, options?)functionWhere the guide opens, as a compiled screen: its home page, or the index when it has none. { back: true } compiles the entry a host opens, with a back control, as a second screen
guideIndexScreen(manifest, options?)functionThe index as a compiled screen: what every page's back and index button open
guidePageScreen(manifest, pageId, options?)functionOne page as a compiled screen
openGuide(ns, player, options?)functionNavigate to a guide's entry by its namespace, from either realm: the operators' entry for an operator when the guide has one. { back: true } opens the entry with a back control, which returns to the screen it was opened from
GuideComponentstypeRecord<string, FunctionComponent>, what a componentsModule default-exports for cmp blocks

Each screen factory takes audience: 'op' to build the operators' set of a guide with operator-only pages; without it, it builds what everyone reads.

On this page