diff options
Diffstat (limited to 'website/src')
| -rw-r--r-- | website/src/docs/features/velocity.md | 55 | ||||
| -rw-r--r-- | website/src/docs/reference/compatibility.md | 57 | ||||
| -rw-r--r-- | website/src/en/docs/features/velocity.md | 53 | ||||
| -rw-r--r-- | website/src/en/docs/reference/compatibility.md | 57 | ||||
| -rw-r--r-- | website/src/en/index.md | 13 | ||||
| -rw-r--r-- | website/src/index.md | 13 |
6 files changed, 171 insertions, 77 deletions
diff --git a/website/src/docs/features/velocity.md b/website/src/docs/features/velocity.md index d1394ec..3fa919e 100644 --- a/website/src/docs/features/velocity.md +++ b/website/src/docs/features/velocity.md @@ -6,6 +6,10 @@ layout: doc Velocity プロキシを経由して複数の Paper / Folia サーバー間でグローバルチャットをリレーします. +::: tip 互換性について +Paper プラグインと Velocity プラグインは独立にバージョン管理されています.**両方の最新版を使えば常に動作します.** 古いバージョンを混在させたい場合は,[Paper / Velocity 互換性](/docs/reference/compatibility) を参照してください. +::: + ## セットアップ ### 1. Velocity プラグインの導入 @@ -47,45 +51,10 @@ features: 各メッセージに一意な ID が付与され,キャッシュにより同じメッセージが重複して表示されることを防ぎます.キャッシュサイズは `messageDeduplicationCacheSize` (デフォルト: `100`) で設定できます. -## プロトコルバージョン - -Paper と Velocity 間の互換性はプロトコルバージョンで管理されます.接続時にハンドシェイクが行われ,互換性のないバージョン同士では接続が拒否されます. - -### バージョンバンプルール - -| レベル | 変更例 | 互換性 | デプロイ順序 | -|--------|--------|--------|-------------| -| PATCH (1.0.0 → 1.0.1) | optional フィールド追加,新 sub-channel 追加 | 完全互換 (`ignoreUnknownKeys=true` で安全) | 順不同,いつでも | -| MINOR (1.0.x → 1.1.0) | required フィールド追加,既存 sub-channel のセマンティクス変更 | `MIN_SUPPORTED_MINOR` の範囲内で後方互換 | **Velocity を先に更新** → 各 Paper を順次更新 | -| MAJOR (1.x.x → 2.0.0) | ワイヤフォーマット変更,sub-channel 削除/リネーム | 非互換 | **全サーバー同時デプロイ** | - -### 互換性判定 - -ハンドシェイク時に以下のルールで互換性が判定されます: - -- **MAJOR** が一致すること -- リモートの **MINOR** が `MIN_SUPPORTED_MINOR` 以上かつ自身の MINOR 以下であること -- **PATCH** は互換性判定に影響しない - -#### 例: Velocity がプロトコル 1.2.0 で `MIN_SUPPORTED_MINOR=1` の場合 - -| Paper プロトコル | 結果 | -|-----------------|------| -| 1.1.x | 接続 OK | -| 1.2.x | 接続 OK | -| 1.0.x | 拒否 (`MIN_SUPPORTED_MINOR` より古い) | -| 1.3.x | 拒否 (Velocity より新しい) | -| 2.0.x | 拒否 (MAJOR 不一致) | - -### 運用サイクル - -1. **プロトコル変更なし** → Paper / Velocity を独立にデプロイ可能 -2. **PATCH 変更** → どちら側からでも自由にデプロイ -3. **MINOR 変更** → Velocity を先行更新し,`MIN_SUPPORTED_MINOR` で旧 Paper の猶予期間を設定.全 Paper 更新後に `MIN_SUPPORTED_MINOR` を引き上げ -4. **MAJOR 変更** → メンテナンスウィンドウで一括更新 - ## 接続状態 +`/lcv status` で確認できる状態と,それぞれの意味は以下の通りです. + | 状態 | 説明 | |------|------| | `DISCONNECTED` | 未接続 | @@ -93,7 +62,13 @@ Paper と Velocity 間の互換性はプロトコルバージョンで管理さ | `CONNECTED` | 接続済み | | `FAILED` | 接続失敗 | -ハンドシェイクのタイムアウトは5秒です.タイムアウトした場合,状態は `FAILED` になります. +ハンドシェイクのタイムアウトは 5 秒です.タイムアウトした場合,状態は `FAILED` になります. + +### `FAILED` になったときの確認ポイント + +- Velocity プラグインが正しく導入され,プロキシが起動しているか +- Paper の `serverName` が Velocity 設定のサーバー名と一致しているか +- Paper / Velocity プラグインの**プロトコルバージョン**が互換であるか — [互換性マトリクス](/docs/reference/compatibility#互換性マトリクス) で確認できます ## 設定一覧 @@ -107,3 +82,7 @@ Paper と Velocity 間の互換性はプロトコルバージョンで管理さ ## メッセージフォーマット クロスサーバーチャットの表示形式は `config.yml` の `messageFormat.crossServerGlobalChatFormat` でカスタマイズできます.詳細は[メッセージフォーマット](/docs/reference/message-format)を参照してください. + +## 関連ドキュメント + +- [Paper / Velocity 互換性](/docs/reference/compatibility) — プロトコルバージョンとローリングアップデートの詳細 diff --git a/website/src/docs/reference/compatibility.md b/website/src/docs/reference/compatibility.md new file mode 100644 index 0000000..dc0c3b2 --- /dev/null +++ b/website/src/docs/reference/compatibility.md @@ -0,0 +1,57 @@ +--- +layout: doc +--- + +# Paper / Velocity 互換性 + +LunaticChat の Paper プラグインと Velocity プラグインは独立にバージョン管理されています.それぞれの組み合わせが動作するかどうかは,両プラグインに埋め込まれた**プロトコルバージョン**で判定されます. + +## 結論から + +- **両プラグインの最新版同士は常に互換性があります.** 迷ったら両方を最新にしてください. +- 古いバージョンを混在させたい場合は,下のマトリクスで組み合わせを確認してください. +- 接続状態は Minecraft サーバーで `/lcv status` を実行すると確認できます. + +## 互換性マトリクス + +各セルは「その Paper × Velocity の組み合わせが接続できるか」を示します.データは GitHub Releases から自動取得されます. + +<CompatibilityMatrix /> + +## プロトコルバージョンとは + +Paper / Velocity 間の通信は LunaticChat 独自のプラグインメッセージプロトコルで行われています.プロトコルにはセマンティックバージョニング (`MAJOR.MINOR.PATCH`) が振られており,接続時のハンドシェイクで両者のバージョンが照合されます. + +判定ルールは以下です: + +- **MAJOR** が一致すること +- 相手の **MINOR** が自分の `MIN_SUPPORTED_MINOR` 以上かつ自分の `MINOR` 以下であること +- **PATCH** は判定に影響しない + +`MIN_SUPPORTED_MINOR` は「どこまで古い MINOR を受け入れるか」を示す値で,ローリングアップデート中の猶予期間を作るために使われます. + +### バージョンバンプの基準 + +| レベル | 変更例 | 互換性 | デプロイ順序 | +|--------|--------|--------|-------------| +| **PATCH** (1.0.0 → 1.0.1) | optional フィールド追加,新 sub-channel 追加 | 完全互換 (`ignoreUnknownKeys=true` で安全) | 順不同,いつでも | +| **MINOR** (1.0.x → 1.1.0) | required フィールド追加,既存 sub-channel のセマンティクス変更 | `MIN_SUPPORTED_MINOR` の範囲内で後方互換 | **Velocity を先に更新** → 各 Paper を順次更新 | +| **MAJOR** (1.x.x → 2.0.0) | ワイヤフォーマット変更,sub-channel 削除/リネーム | 非互換 | **全サーバー同時デプロイ** | + +### ローリングアップデートの考え方 + +1. **プロトコル変更なし**:Paper / Velocity を独立にデプロイ可能.プラグインのバグ修正やリファクタはここに入ります. +2. **PATCH 変更**:どちら側からでも自由にデプロイ可能. +3. **MINOR 変更**:Velocity を先行更新し,`MIN_SUPPORTED_MINOR` で旧 Paper を許容.全 Paper 更新後に `MIN_SUPPORTED_MINOR` を引き上げ. +4. **MAJOR 変更**:メンテナンスウィンドウで一括更新. + +## ハンドシェイクの挙動 + +接続時は以下の流れで互換性が確認されます: + +1. Paper サーバー起動時に Velocity に対してハンドシェイクを送信 +2. Velocity が自身のプロトコルバージョンと照合 +3. 不一致の場合は接続が拒否され,状態が `FAILED` になる +4. ハンドシェイクのタイムアウトは 5 秒 + +接続状態は `/lcv status` で確認できます.詳細は [Velocity 連携](/docs/features/velocity#接続状態) を参照してください. diff --git a/website/src/en/docs/features/velocity.md b/website/src/en/docs/features/velocity.md index 9241e80..5715014 100644 --- a/website/src/en/docs/features/velocity.md +++ b/website/src/en/docs/features/velocity.md @@ -6,6 +6,10 @@ layout: doc Relays global chat across multiple Paper / Folia servers via a Velocity proxy. +::: tip About compatibility +The Paper and Velocity plugins are versioned independently. **Using the latest of both always works.** If you need to mix older versions, see [Paper / Velocity Compatibility](/en/docs/reference/compatibility). +::: + ## Setup ### 1. Install the Velocity Plugin @@ -47,45 +51,10 @@ When `crossServerGlobalChat` is set to `true`, player chat messages are relayed Each message is assigned a unique ID, and a cache prevents the same message from being displayed more than once. The cache size can be configured with `messageDeduplicationCacheSize` (default: `100`). -## Protocol Version - -Compatibility between Paper and Velocity is managed by protocol version. A handshake is performed upon connection, and incompatible versions are rejected. - -### Version Bump Rules - -| Level | Example Change | Compatibility | Deployment Order | -|-------|---------------|---------------|-----------------| -| PATCH (1.0.0 -> 1.0.1) | Adding optional fields, new sub-channels | Fully compatible (safe with `ignoreUnknownKeys=true`) | Any order, anytime | -| MINOR (1.0.x -> 1.1.0) | Adding required fields, changing existing sub-channel semantics | Backward compatible within `MIN_SUPPORTED_MINOR` range | **Update Velocity first** -> then update each Paper server | -| MAJOR (1.x.x -> 2.0.0) | Wire format changes, removing/renaming sub-channels | Incompatible | **Simultaneous deployment of all servers** | - -### Compatibility Check - -Compatibility is determined during the handshake using the following rules: - -- **MAJOR** versions must match -- The remote **MINOR** must be at least `MIN_SUPPORTED_MINOR` and at most the local MINOR -- **PATCH** does not affect the compatibility check - -#### Example: Velocity with protocol 1.2.0 and `MIN_SUPPORTED_MINOR=1` - -| Paper Protocol | Result | -|---------------|--------| -| 1.1.x | Connection OK | -| 1.2.x | Connection OK | -| 1.0.x | Rejected (older than `MIN_SUPPORTED_MINOR`) | -| 1.3.x | Rejected (newer than Velocity) | -| 2.0.x | Rejected (MAJOR mismatch) | - -### Operational Cycle - -1. **No protocol change** -> Paper / Velocity can be deployed independently -2. **PATCH change** -> Deploy freely from either side -3. **MINOR change** -> Update Velocity first and set `MIN_SUPPORTED_MINOR` to allow a grace period for older Paper servers. After all Paper servers are updated, raise `MIN_SUPPORTED_MINOR` -4. **MAJOR change** -> Simultaneous update during a maintenance window - ## Connection States +The states reported by `/lcv status` and their meanings: + | State | Description | |-------|-------------| | `DISCONNECTED` | Not connected | @@ -95,6 +64,12 @@ Compatibility is determined during the handshake using the following rules: The handshake timeout is 5 seconds. If the handshake times out, the state becomes `FAILED`. +### Troubleshooting `FAILED` + +- Confirm the Velocity plugin is installed and the proxy is running +- Confirm the Paper `serverName` matches the server name configured in Velocity +- Confirm the **protocol versions** of the Paper and Velocity plugins are compatible — see the [compatibility matrix](/en/docs/reference/compatibility#compatibility-matrix) + ## Configuration Reference | Setting Key | Default | Description | @@ -107,3 +82,7 @@ The handshake timeout is 5 seconds. If the handshake times out, the state become ## Message Format The display format for cross-server chat can be customized via `messageFormat.crossServerGlobalChatFormat` in `config.yml`. See [Message Format](/en/docs/reference/message-format) for details. + +## Related Documents + +- [Paper / Velocity Compatibility](/en/docs/reference/compatibility) — protocol version and rolling update details diff --git a/website/src/en/docs/reference/compatibility.md b/website/src/en/docs/reference/compatibility.md new file mode 100644 index 0000000..a2b1e8f --- /dev/null +++ b/website/src/en/docs/reference/compatibility.md @@ -0,0 +1,57 @@ +--- +layout: doc +--- + +# Paper / Velocity Compatibility + +The Paper and Velocity plugins of LunaticChat are versioned independently. Whether a given combination works is determined by the **protocol version** embedded in each plugin. + +## TL;DR + +- **The latest Paper and the latest Velocity are always compatible.** When in doubt, use the latest of both. +- If you need to mix older versions, check the matrix below. +- You can verify the live connection state by running `/lcv status` on the Minecraft server. + +## Compatibility Matrix + +Each cell indicates whether the corresponding Paper × Velocity combination can connect. Data is fetched from GitHub Releases automatically. + +<CompatibilityMatrix /> + +## What Is a Protocol Version? + +Paper and Velocity communicate via a LunaticChat-specific plugin messaging protocol. The protocol carries a semantic version (`MAJOR.MINOR.PATCH`), and a handshake at connection time validates both sides. + +The rules are: + +- **MAJOR** must match exactly +- The remote **MINOR** must be at least `MIN_SUPPORTED_MINOR` and at most the local `MINOR` +- **PATCH** does not affect compatibility + +`MIN_SUPPORTED_MINOR` controls how far back the local plugin accepts older peers, providing a grace window during rolling updates. + +### Version Bump Rules + +| Level | Example Change | Compatibility | Deployment Order | +|-------|---------------|---------------|------------------| +| **PATCH** (1.0.0 → 1.0.1) | Adding optional fields, new sub-channels | Fully compatible (safe with `ignoreUnknownKeys=true`) | Any order, anytime | +| **MINOR** (1.0.x → 1.1.0) | Adding required fields, changing existing sub-channel semantics | Backward compatible within `MIN_SUPPORTED_MINOR` range | **Update Velocity first** → then update each Paper server | +| **MAJOR** (1.x.x → 2.0.0) | Wire format changes, removing/renaming sub-channels | Incompatible | **Simultaneous deployment of all servers** | + +### Rolling Update Strategy + +1. **No protocol change**: Paper and Velocity can be deployed independently. Plugin bug fixes and refactors fall here. +2. **PATCH change**: Deploy from either side freely. +3. **MINOR change**: Update Velocity first and use `MIN_SUPPORTED_MINOR` as a grace window for older Paper servers. After all Paper servers are updated, bump `MIN_SUPPORTED_MINOR`. +4. **MAJOR change**: Update all servers simultaneously during a maintenance window. + +## Handshake Behavior + +Compatibility is checked at connection time: + +1. The Paper server sends a handshake to Velocity at startup +2. Velocity validates the protocol version against its own +3. On mismatch, the connection is rejected and the state becomes `FAILED` +4. The handshake timeout is 5 seconds + +Live connection state is available via `/lcv status`. See [Velocity Integration](/en/docs/features/velocity#connection-states) for details. diff --git a/website/src/en/index.md b/website/src/en/index.md index b823a0d..766478d 100644 --- a/website/src/en/index.md +++ b/website/src/en/index.md @@ -123,7 +123,18 @@ features: <hr class="home-divider" /> -<!-- Section 5: Platforms --> +<!-- Section 5: Compatibility Matrix --> +<div class="platform-section"> + <h2>Paper / Velocity Compatibility</h2> + <p class="section-desc">Latest versions are always compatible. Mix older versions? Check the matrix below.</p> + <div style="text-align: left;"> + <CompatibilityMatrix /> + </div> +</div> + +<hr class="home-divider" /> + +<!-- Section 6: Platforms --> <div class="platform-section"> <h2>Multi-Platform Support</h2> <p class="section-desc">Flexibly deploy to match your server setup</p> diff --git a/website/src/index.md b/website/src/index.md index 007a6ad..c1d867d 100644 --- a/website/src/index.md +++ b/website/src/index.md @@ -123,7 +123,18 @@ features: <hr class="home-divider" /> -<!-- Section 5: プラットフォーム --> +<!-- Section 5: 互換性マトリクス --> +<div class="platform-section"> + <h2>Paper / Velocity 互換性</h2> + <p class="section-desc">最新版同士は常に互換.古いバージョンを混在させる場合は下のマトリクスで確認できます</p> + <div style="text-align: left;"> + <CompatibilityMatrix /> + </div> +</div> + +<hr class="home-divider" /> + +<!-- Section 6: プラットフォーム --> <div class="platform-section"> <h2>マルチプラットフォーム対応</h2> <p class="section-desc">サーバーの構成に合わせて柔軟に導入できます</p> |
