SettingsCommand

class SettingsCommand(plugin: LunaticChat, settingHandlerRegistry: SettingHandlerRegistry, languageManager: LanguageManager) : LunaticSubCommand(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
open override val literal: String

The literal this subcommand is typed as. Parents use it to look up help text, so it must be the same string build passes to Commands.literal.

Functions

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

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

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

Builds the primary node and its aliases, each gated on permissionNode.