SettingsCommand

class SettingsCommand(plugin: LunaticChat, settingHandlerRegistry: SettingHandlerRegistry, languageManager: LanguageManager) : LunaticCommand(source)

Setting subcommand for /lc command. Handles /lc setting on|off

This subcommand is extensible - new settings can be added by:

  1. Adding a new SettingKey

  2. Creating a SettingHandler implementation

  3. Registering the handler in SettingHandlerRegistry

Constructors

Link copied to clipboard
constructor(plugin: LunaticChat, settingHandlerRegistry: SettingHandlerRegistry, languageManager: LanguageManager)

Properties

Link copied to clipboard

Command aliases

Link copied to clipboard

Command description for help text - can be overridden for i18n

Link copied to clipboard

The primary command name

Link copied to clipboard

Required permission node, if any

Functions

Link copied to clipboard
fun build(): LiteralArgumentBuilder<CommandSourceStack>

Builds the setting subcommand structure. For each registered setting key, creates:

Link copied to clipboard
fun buildAllWithPermissionCheck(): List<LiteralArgumentBuilder<CommandSourceStack>>
Link copied to clipboard
open override fun buildCommand(): LiteralArgumentBuilder<CommandSourceStack>

Build the Brigadier command tree. Subclasses implement this to define arguments and execution logic.

Link copied to clipboard
fun buildWithChecks(): LiteralArgumentBuilder<CommandSourceStack>

Wraps the command builder with permission checks. Called by CommandRegistry during registration.

Link copied to clipboard
fun buildWithPermissionCheck(): LiteralArgumentBuilder<CommandSourceStack>

Builds the setting subcommand structure with permission checks. This method should be called from parent commands.