Skip to content

API reference Obsidian.API.Registries

DialogRegistry class

Custom dialogs synchronized when players configure. Register them during plugin initialization.

public static class DialogRegistry

In Obsidian.API.

Remarks

A plugin's dialogs are removed when it unloads. Players already playing get the changed dialogs when plugins load or unload, which sends them back through configuration.

Methods

GetRegistrations()

public static ImmutableArray<DialogRegistration> GetRegistrations();

The registered dialogs, by identifier.

Register(string, DialogElement, bool, bool)

public static void Register(string id, DialogElement dialog, bool quickAction = false, bool pauseScreen = false);

Registers a dialog, sent to players when they configure.

Parameters

id
The dialog's identifier, outside the minecraft namespace.
dialog
The dialog.
quickAction
Whether the quick actions key opens it.
pauseScreen
Whether the pause menu links to it.

Unregister(string)

public static bool Unregister(string id);

Removes a dialog.

Returns

Whether it was registered.

On this page