AddonConfig

interface AddonConfig

Adds a custom config widget under the addon's block to the Plasmo Voice menu in addons tab.

Properties

Link copied to clipboard
@NotNull
val ID_PATTERN: @NotNull Pattern
The regular expression pattern that widget ids must match.

Functions

Link copied to clipboard
@NotNull
abstract fun addDropDown(@NotNull widgetId: @NotNull String, @NotNull label: @NotNull McTextComponent, @Nullable tooltip: @Nullable McTextComponent, @NotNull elements: @NotNull List<String>, elementTooltip: Boolean, defaultValueIndex: Int): @NotNull IntConfigEntry
Adds a drop-down list widget to the addon's configuration.
Link copied to clipboard
@NotNull
abstract fun addIntSlider(@NotNull widgetId: @NotNull String, @NotNull label: @NotNull McTextComponent, @Nullable tooltip: @Nullable McTextComponent, @NotNull suffix: @NotNull String, defaultValue: Int, min: Int, max: Int): @NotNull IntConfigEntry
Adds an integer slider to the addon's configuration.
Link copied to clipboard
@NotNull
abstract fun addToggle(@NotNull widgetId: @NotNull String, @NotNull label: @NotNull McTextComponent, @Nullable tooltip: @Nullable McTextComponent, defaultValue: Boolean): @NotNull BooleanConfigEntry
Adds a toggle (boolean) widget to the addon's configuration.
Link copied to clipboard
@NotNull
abstract fun addVolumeSlider(@NotNull widgetId: @NotNull String, @NotNull label: @NotNull McTextComponent, @Nullable tooltip: @Nullable McTextComponent, @NotNull suffix: @NotNull String, defaultValue: Double, min: Double, max: Double): @NotNull DoubleConfigEntry
Adds a volume slider to the addon's configuration.
Link copied to clipboard
abstract fun clear()
Removes all widgets.
Link copied to clipboard
abstract fun <T : ConfigEntry<out Any>?> getWidgetConfigEntry(@NotNull widgetId: @NotNull String): Optional<T>
Gets the configuration entry associated with the specified widget.
Link copied to clipboard
abstract fun removeWidget(@NotNull widgetId: @NotNull String): Boolean
Removes the specified widget from the configuration.