diff options
| author | Sho Sakuma <me@m1sk9.dev> | 2026-08-10 08:31:20 +0900 |
|---|---|---|
| committer | Sho Sakuma <me@m1sk9.dev> | 2026-08-10 08:31:20 +0900 |
| commit | f08d4d8f0557581d93063cd9f6e750ab3ac9cc17 (patch) | |
| tree | 52c3bc1fbd6c0012edd3b1239f58d262e1a4e23d /website/src/ja/docs/reference | |
| parent | f52d13819e431af39e5a8c9be178307261a12d19 (diff) | |
| download | LunaticChat-f08d4d8f0557581d93063cd9f6e750ab3ac9cc17.tar.gz LunaticChat-f08d4d8f0557581d93063cd9f6e750ab3ac9cc17.tar.bz2 LunaticChat-f08d4d8f0557581d93063cd9f6e750ab3ac9cc17.zip | |
feat(paper): add /lc reload to apply message formats without a restart
Changing a message format meant taking the server down, because config.yml
was read once in onEnable and every consumer held the value it was built
with. Operators tune these formats far more often than anything else in the
file, and a restart is a disproportionate price for a colour code.
Only messageFormat is applied. The rest of config.yml settles things once,
at startup - which services exist, which commands and listeners are
registered, which files are opened - and none of that can be redone while
the server runs: Paper registers commands only through its COMMANDS
lifecycle event, Bukkit cannot unregister a listener, and the conversion
cache saver keeps no task handle to cancel. Rebuilding the services would
leave the old ones still wired up, so a changed setting the server cannot
pick up is reported back as needing a restart rather than silently ignored.
MessageFormatHolder is deliberately narrower than LunaticChatConfiguration:
taking it says the value is live, taking the configuration says it was
frozen at startup. A holder over the whole tree would hold a configuration
matching no version of the file, since only messageFormat is ever swapped.
Reload reads config.yml more strictly than startup does, because it has an
option startup does not - leaving the running configuration alone. Startup
falls a single unreadable setting back to its default so the server can come
up; reload refuses the file, names every unreadable setting at once, and
keeps what the server already had. A document holding no settings is refused
for the same reason: it cannot be told apart from a config.yml caught
halfway through being written, and resetting every format over that is worse
than doing nothing.
Closes #266
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'website/src/ja/docs/reference')
| -rw-r--r-- | website/src/ja/docs/reference/commands.md | 8 | ||||
| -rw-r--r-- | website/src/ja/docs/reference/message-format.md | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/website/src/ja/docs/reference/commands.md b/website/src/ja/docs/reference/commands.md index 8102a75..6d34f1c 100644 --- a/website/src/ja/docs/reference/commands.md +++ b/website/src/ja/docs/reference/commands.md @@ -36,6 +36,14 @@ LunaticChat で使用できるすべてのコマンドのリファレンスでã� - **エイリアス**: `st` - **パーミッション**: `lunaticchat.command.lc.status` +### `/lc reload` <Badge type="tip" text="v1.4.0~" /> + +`config.yml` を読み直して `messageFormat` の設定を反映し,残りの変更のうち再起動が必要なものを報告します.[設定の反映](/ja/docs/configuration#設定の反映)を参照してください. + +- **パーミッション**: `lunaticchat.command.lc.reload` (デフォルト: op) +- **コンソール・RCON からも実行可能** +- `config.yml` を完全に読み取れない場合は拒否され,稼働中の設定がそのまま維持されます + ### `/lc settings [key] [on|off]` プレイヤー個人の設定を確認・変更します.引数なしで設定一覧を表示します. diff --git a/website/src/ja/docs/reference/message-format.md b/website/src/ja/docs/reference/message-format.md index 7ae42e9..3eddd1a 100644 --- a/website/src/ja/docs/reference/message-format.md +++ b/website/src/ja/docs/reference/message-format.md @@ -6,6 +6,8 @@ layout: doc `config.yml` の `messageFormat` セクションで,チャットメッセージの表示形式をカスタマイズできます. +`/lc reload` <Badge type="tip" text="v1.4.0~" /> が再起動なしで反映できるのはこれらの設定だけです.`config.yml` のほかのセクションはサーバー起動時に固定されます.[設定の反映](/ja/docs/configuration#設定の反映)を参照してください. + ## プレースホルダー | プレースホルダー | 説明 | 使用可能なフォーマット | |
