Skip to content

Configuration

LunaticChat's configuration is managed in plugins/LunaticChat/config.yml. A default configuration file is generated on the server's first startup.

Applying Changes

/lc reload v1.4.0~ re-reads config.yml while the server runs. It applies the messageFormat settings and nothing else.

Every other setting decides something that is settled once, when the plugin starts: which services exist, which commands and listeners are registered, which files are opened. Rather than pretend otherwise, the command lists the settings you changed that the running server cannot pick up, so you know a restart is still needed.

[LC] Reloaded config.yml, but some of the changes need a server restart to take effect.

The reply says only whether what you edited is in effect. Which settings moved is written to the server log.

Applied by /lc reloadNeeds a restart
messageFormat.*Yes
features.*Yes
debugYes
checkForUpdates, language, userSettingsFilePathYes

The command is available to the console and RCON as well as to players, and requires lunaticchat.command.lc.reload (op by default).

Boolean settings accept true / false, and also the yes / no / on / off spellings that Bukkit accepted historically, so a file written for an older release keeps working as it did.

Recovery From an Invalid File v1.3.0~

A config.yml the plugin cannot use never stops the plugin from starting.

  • If a single value cannot be read, only that setting falls back to its default, and a warning naming the key is logged. Every other setting in the file is still honoured.
  • If the file is not valid YAML at all, or cannot be read from disk, every setting falls back to its default and an error is logged.
  • A file containing only comments is a valid way of saying "use the defaults" and is not reported as a problem.

Check the server log after editing config.yml: a setting that quietly reverted to its default was reported there.

/lc reload is stricter, because it has an option that startup does not — leaving the running configuration alone. It refuses the file rather than falling anything back to a default, naming every setting it could not read in one go, and the server keeps the configuration it already had. A file that holds no settings at all is refused for the same reason: a reload cannot tell a comments-only file apart from one caught halfway through being written.

A misspelled key is still not detected, by either path — an unknown key is ignored so that a config.yml written for a newer build does not break an older one. When a reload finds nothing to apply, it says so rather than reporting success, which is the signal that a key may be misspelled.

Global Settings

KeyTypeDefaultDescription
debugBoolean or blockfalseDebug logging. See Debug Logging
userSettingsFilePathString"player-settings.yaml"Path to the player settings file
checkForUpdatesBooleantrueCheck for updates on startup
languageString"en"Plugin language (en / ja)

Debug Logging v1.4.0~

debug decides how much LunaticChat writes to the server log, by category. A category is an area of the plugin, so instrumenting the chat path does not bury a handshake problem.

CategoryWhat it reports
configThe configuration read at startup, and what a reload changed
chatHow each message was routed, and cross-server deduplication hits
channelJoins, leaves and every refusal, with the reason
conversionRomaji conversion decisions and cache hits
protocolSub-channel, byte length and message ids on the wire
velocityHandshake, connection state, presence and relay decisions
storageDebounced saves, atomic writes and their size
commandPermission denials and command results

Three spellings are accepted:

yaml
debug: false                       # off (yes / no / on / off also work)

debug: true                        # every category

debug: velocity,protocol           # only these

debug:
  enabled: true
  categories: [velocity, protocol] # the same, as a block

enabled: false wins over any categories listed beside it. A category name this build does not know is reported as a warning and the categories spelled correctly are still applied.

Debug lines are written at INFO with a [LC/<category>] prefix, because Paper's stock log4j configuration does not print anything below INFO.

Switching Categories at Runtime

/lc debug                     # what is logging now
/lc debug <category> on|off
/lc debug all on|off

This changes only the running server — config.yml is never rewritten, so a restart or /lc reload puts the value in the file back in charge. Requires lunaticchat.command.lc.debug (op by default).

Diagnostics Report

/lc dump writes plugins/LunaticChat/debug/report-<timestamp>.txt, and confirms in chat that it wrote one to the plugin folder. The exact path is left to the server log, since the command can be granted to someone with no filesystem access. The report holds the plugin, protocol, server and Java versions, which features are on, the Velocity connection state, and how full each store is. It deliberately contains no message text, player name or UUID, so it is safe to paste into a bug report. Requires lunaticchat.command.lc.dump (op by default).

On the Velocity proxy there is no configuration file, so the same switch is read from a system property or an environment variable:

java -Dlunaticchat.debug=velocity,protocol -jar velocity.jar

LUNATICCHAT_DEBUG=velocity,protocol

The system property wins over the environment variable. This is deliberately not carried over the handshake: the proxy is shared by every backend, so one Paper server must not decide how much the proxy logs for everyone else.

Feature Settings (features)

Quick Replies (features.quickReplies)

KeyTypeDefaultDescription
enabledBooleantrueEnable the /reply command

Japanese Conversion (features.japaneseConversion)

KeyTypeDefaultDescription
enabledBooleanfalseEnable romaji-to-hiragana conversion
cache.maxEntriesInt500Maximum number of conversion cache entries
cache.saveIntervalSecondsInt300Interval (in seconds) for saving cache to disk
cache.filePathString"conversion_cache.json"Path to the cache file
api.timeoutLong3000API request timeout (in milliseconds)

Channel Chat (features.channelChat)

KeyTypeDefaultDescription
enabledBooleanfalseEnable the channel chat feature
maxChannelsPerServerInt0Maximum channels per server (0 = unlimited)
maxMembersPerChannelInt0Maximum members per channel (0 = unlimited)
maxMembershipPerPlayerInt0Maximum channel memberships per player (0 = unlimited)

Message Logging (features.channelChat.messageLogging)

KeyTypeDefaultDescription
enabledBooleantrueLog channel messages to an NDJSON file
retentionDaysInt30Log file retention period in days (0 = indefinite)
maxFileSizeMBInt100Maximum size of a single log file (MB)

Velocity Integration (features.velocityIntegration)

KeyTypeDefaultDescription
enabledBooleanfalseEnable integration with the Velocity proxy
crossServerGlobalChatBooleanfalseEnable cross-server global chat
crossServerDirectMessageBooleanfalseEnable cross-server direct messaging
serverNameString"Unknown"Server name displayed in cross-server chat
messageDeduplicationCacheSizeInt100Size of the message deduplication cache

Message Format (messageFormat)

KeyDefaultAvailable Placeholders
directMessageFormat§7[§e{sender} §7>> §e{recipient}§7] §f{message}{sender}, {recipient}, {message}
channelMessageFormat§7[§b#{channel}§7] §e{sender}: §f{message}{sender}, {message}, {channel}
crossServerGlobalChatFormat§7[§6{server}§7] §e{sender}: §f{message}{sender}, {message}, {server}

Data Files

Everything the plugin writes lives under plugins/LunaticChat/.

FileWritten whenNotes
config.ymlGenerated on first startupNever rewritten by the plugin
player-settings.yamlA player changes a setting with /lc settingsPath configurable via userSettingsFilePath. If it cannot be read at startup, every player's settings fall back to their defaults
channels.jsonChannels or memberships changeOnly when channel chat is enabled
conversion_cache.jsonPeriodically, per cache.saveIntervalSecondsOnly when Japanese conversion is enabled. Path configurable via cache.filePath
logs/channelchat/Per channel messageOnly when message logging is enabled. See Message Logging

Saves are coalesced rather than written on every change, and every file is written atomically, so nothing ever reads a half-written file. All of them are also flushed when the server stops.

Default Configuration File

View on GitHub