@bedrock-core/config
v0.2.0
Published
The bedrock-core addon list + config + guide UI: one realm serves it for every registered addon
Maintainers
Readme
@bedrock-core/config

The shared addon list + config + guide UI for @bedrock-core/ui.
Every bedrock-core addon mounts it with one line and gets settings screens, an in-game guide and a
directory of every other addon in the world — because the registry, config schemas, guides and
translations all replicate over @bedrock-core/sync.
Whichever realm runs the newest runtime renders the UI for all of them, so an addon shipped a year
ago is served today's screens.
Install
yarn add @bedrock-core/configIt also ships inside the umbrella package as @bedrock-core/ui/config. The package depends on
@bedrock-core/server-runtime for types only — no value import, so the two build and version
independently.
What it gives you
ui(core, options?)— mounts everything: the commands, the open RPC, and this addon's place in the host election- Commands under your own namespace —
<ns>:configand<ns>:configat(read and write settings from chat, with generated autocomplete for every verb and setting),<ns>:guide,<ns>:list. Turn them off withui(core, { commands: false }) - Screens for free — the addon list, the scope and target pickers, the config form for a scope, a reset confirmation, and each addon's guide
- A permission rule you can reuse —
isOperator,allowedScopesandclampTarget, the caller-side half of authorization (the owning addon re-checks every write) Appfor a custom mount,registerAddonCommandsfor the commands alone, andCONFIG_SCOPESwith theConfigScope/EntrySchema/FlatSchemaLiketypes for code building its own pickers
Usage
import { core } from '@bedrock-core/server-runtime';
import { ui } from '@bedrock-core/config';
import bundle from '@bedrock-core/generated/i18n';
import guides from '@bedrock-core/generated/guides';
const config = core.register({
creator: 'bt',
pack: 'gc_graves',
packName: 'Graves',
version: '1.0.0',
translations: bundle,
guide: guides,
config: { server: { keepInventory: { type: 'boolean', default: false, label: 'Keep Inventory' } } },
});
ui(core); // registers bt_gc_graves:config, :configat, :guide, :listCall ui(core) once, after core.register().
Documentation
- config —
ui()and its options, every command and generated enum, the permission model, the three scopes, typed config schemas, and the API reference - Config in the server runtime — declaring a schema, the scope accessors, cross-addon access and authorization
- Host election — which realm serves the UI, and why
License
MIT — see the root repository.
