summaryrefslogtreecommitdiff
path: root/website/src/ja/docs/features
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-08-10 08:31:20 +0900
committerSho Sakuma <me@m1sk9.dev>2026-08-10 08:31:20 +0900
commitf08d4d8f0557581d93063cd9f6e750ab3ac9cc17 (patch)
tree52c3bc1fbd6c0012edd3b1239f58d262e1a4e23d /website/src/ja/docs/features
parentf52d13819e431af39e5a8c9be178307261a12d19 (diff)
downloadLunaticChat-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/features')
-rw-r--r--website/src/ja/docs/features/admin.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/website/src/ja/docs/features/admin.md b/website/src/ja/docs/features/admin.md
index a29be09..61843b0 100644
--- a/website/src/ja/docs/features/admin.md
+++ b/website/src/ja/docs/features/admin.md
@@ -22,6 +22,26 @@ layout: doc
- 設定値 (デバッグモード,アップデート確認,言語)
- GitHub,Modrinth,ドキュメントへのリンク
+## 設定のリロード (`/lc reload`) <Badge type="tip" text="v1.4.0~" />
+
+サーバーを再起動せずに `config.yml` を読み直します.
+
+```
+/lc reload
+```
+
+反映されるのは [`messageFormat`](/ja/docs/reference/message-format) の設定のみです.`config.yml` のほかの設定はプラグインが起動時に確定させる事柄を左右するため,反映されたように見せかけることはせず,再起動が必要な変更を一覧で表示します.
+
+```
+[LC] config.yml を再読み込みしました.
+[LC] 適用しました: messageFormat.directMessageFormat
+[LC] 適用するにはサーバーの再起動が必要です: features.channelChat
+```
+
+- **パーミッション**: `lunaticchat.command.lc.reload` (デフォルト: op).コンソール・RCON からも実行可能
+- `config.yml` を完全に読み取れない場合は拒否されます.読み取れなかった設定をすべてまとめて表示し,稼働中の設定はそのまま維持されます.読み取れない設定を個別にデフォルトへフォールバックさせて起動を続行する起動時よりも厳格です
+- リロードはサーバーログにも記録されるため,フォーマットを変更した時期をあとから追跡できます.ファイルの読み取りはメインスレッド外で行われ,RCON セッションは応答が届く前に切断されるため,RCON から実行した場合の結果はコマンド出力ではなくログで確認します
+
## スパイモード
`lunaticchat.spy` パーミッション (デフォルト: op) を持つプレイヤーは,サーバー上で送信されるダイレクトメッセージとチャンネルメッセージの両方を閲覧できます.