From b80fa597a597c099e2f18d7c9c199a7b986255a8 Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:02:49 +0900 Subject: fix: Fix velocity and paper volume --- docker/compose.yaml | 5 +---- x | 11 +++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docker/compose.yaml b/docker/compose.yaml index f11bf95..2f3d5c9 100644 --- a/docker/compose.yaml +++ b/docker/compose.yaml @@ -6,8 +6,7 @@ services: - "25577:25577" volumes: - lunatic-debug-velocity-data:/server - - ../platform-velocity/build/libs:/plugins:ro - - ./plugins-velocity:/data/plugins + - ./plugins-velocity:/server/plugins - ./velocity.toml:/server/velocity.toml environment: TYPE: "VELOCITY" @@ -36,7 +35,6 @@ services: - "25575:25575" volumes: - lunatic-debug-s1-data:/data - - ../platform-paper/build/libs:/plugins:ro - ./plugins-paper-s1:/data/plugins - ./bukkit.yml:/data/bukkit.yml environment: @@ -84,7 +82,6 @@ services: - "25576:25575" volumes: - lunatic-debug-s2-data:/data - - ../platform-paper/build/libs:/plugins:ro - ./plugins-paper-s2:/data/plugins - ./bukkit.yml:/data/bukkit.yml environment: diff --git a/x b/x index 78cbe04..d8c998a 100755 --- a/x +++ b/x @@ -10,6 +10,7 @@ Usage: ./x [options] Commands: start Build with gradlew and start docker compose + start-s1 Build Paper and start only s1 container restart Restart s1, s2 and velocity containers stop Stop docker compose clean Stop docker compose and remove volumes @@ -26,8 +27,18 @@ EOF case "${1:-}" in start) ./gradlew :platform-paper:clean :platform-paper:shadowJar :platform-velocity:clean :platform-velocity:shadowJar + # Copy built JARs to plugin directories + cp platform-paper/build/libs/*.jar docker/plugins-paper-s1/ + cp platform-paper/build/libs/*.jar docker/plugins-paper-s2/ + cp platform-velocity/build/libs/*.jar docker/plugins-velocity/ $DOCKER_COMPOSE up ;; + start-s1) + ./gradlew :platform-paper:clean :platform-paper:shadowJar + # Copy built JAR to s1 plugin directory + cp platform-paper/build/libs/*.jar docker/plugins-paper-s1/ + $DOCKER_COMPOSE up s1 + ;; restart) $DOCKER_COMPOSE restart s1 s2 velocity ;; -- cgit v1.2.1 From 32fc6180bdc2a04f5a3c3d275ac03024905c92cc Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:03:44 +0900 Subject: fix: Fix not updated Velocity metadata --- .../kotlin/dev/m1sk9/lunaticChat/velocity/LunaticChat.kt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/LunaticChat.kt b/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/LunaticChat.kt index 77b8c97..be5a4cd 100644 --- a/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/LunaticChat.kt +++ b/platform-velocity/src/main/kotlin/dev/m1sk9/lunaticChat/velocity/LunaticChat.kt @@ -5,6 +5,7 @@ import com.velocitypowered.api.event.Subscribe import com.velocitypowered.api.event.proxy.ProxyInitializeEvent import com.velocitypowered.api.event.proxy.ProxyShutdownEvent import com.velocitypowered.api.plugin.Plugin +import com.velocitypowered.api.plugin.PluginContainer import com.velocitypowered.api.proxy.ProxyServer import dev.m1sk9.lunaticChat.velocity.messaging.CrossServerChatRelay import dev.m1sk9.lunaticChat.velocity.messaging.PluginMessageHandler @@ -14,11 +15,14 @@ import org.slf4j.Logger * LunaticChat Velocity plugin * * Handles plugin messaging in coordination with Paper servers. + * + * Note: The version in this annotation is not used at runtime. + * The actual version is loaded from velocity-plugin.json via PluginContainer. */ @Plugin( id = "lunaticchat", name = "LunaticChat", - version = "0.8.0", + version = "0.0.0", description = "Next-generation channel chat plugin for Paper/Velocity", url = "https://lc.m1sk9.dev", authors = ["m1sk9"], @@ -28,6 +32,7 @@ class LunaticChat constructor( private val server: ProxyServer, private val logger: Logger, + private val pluginContainer: PluginContainer, ) { private var messageHandler: PluginMessageHandler? = null private var crossServerChatRelay: CrossServerChatRelay? = null @@ -36,6 +41,12 @@ class LunaticChat fun onProxyInitialization(event: ProxyInitializeEvent) { logger.info("Initializing LunaticChat Velocity plugin") + // Get plugin version from velocity-plugin.json (via PluginContainer) + val pluginVersion = + pluginContainer.description.version.orElseThrow { + IllegalStateException("Plugin version not found in velocity-plugin.json") + } + // Initialize cross-server chat relay crossServerChatRelay = CrossServerChatRelay( @@ -49,7 +60,7 @@ class LunaticChat plugin = this@LunaticChat, server = server, logger = logger, - pluginVersion = "0.8.0", + pluginVersion = pluginVersion, crossServerChatRelay = crossServerChatRelay!!, ) messageHandler?.initialize() -- cgit v1.2.1 From 2b2838e9401b3ecf4ec7ec0c642900e015929363 Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:04:18 +0900 Subject: feat: Improve Velocity status command UI --- .../command/impl/lcv/VelocityStatusCommand.kt | 88 +++++++++++----------- platform-paper/src/main/resources/languages/en.yml | 22 ++++-- platform-paper/src/main/resources/languages/ja.yml | 21 ++++-- 3 files changed, 77 insertions(+), 54 deletions(-) diff --git a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt index a4fb838..7845fe8 100644 --- a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt +++ b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt @@ -62,68 +62,70 @@ class VelocityStatusCommand( val stateMessage = when (state) { VelocityConnectionManager.ConnectionState.DISCONNECTED -> { - Component.text("Disconnected", NamedTextColor.GRAY) + Component + .text(languageManager.getMessage("velocity.state.disconnected"), NamedTextColor.GRAY) + .hoverEvent(Component.text(languageManager.getMessage("velocity.hoverInfo.disconnected"), NamedTextColor.GRAY)) } VelocityConnectionManager.ConnectionState.HANDSHAKING -> { - Component.text("Handshaking...", NamedTextColor.YELLOW) + Component + .text(languageManager.getMessage("velocity.state.handshaking"), NamedTextColor.YELLOW) + .hoverEvent(Component.text(languageManager.getMessage("velocity.hoverInfo.handshaking"), NamedTextColor.YELLOW)) } VelocityConnectionManager.ConnectionState.CONNECTED -> { - Component.text("Connected", NamedTextColor.GREEN) + Component + .text(languageManager.getMessage("velocity.state.connected"), NamedTextColor.GREEN) + .hoverEvent(Component.text(languageManager.getMessage("velocity.hoverInfo.connected"), NamedTextColor.GREEN)) } VelocityConnectionManager.ConnectionState.FAILED -> { - Component.text("Failed", NamedTextColor.RED) + Component + .text(languageManager.getMessage("velocity.state.failed"), NamedTextColor.RED) + .hoverEvent(Component.text(languageManager.getMessage("velocity.hoverInfo.failed"), NamedTextColor.RED)) } } - // Header - sender.sendMessage( - MessageFormatter.format( - languageManager.getMessage("velocity.status.header"), - ), - ) - - // Paper plugin version - sender.sendMessage( + val connectionStatus: List = listOf( + // Paper plugin version Component .text(" • ", NamedTextColor.GRAY) - .append(Component.text("Paper Version: ", NamedTextColor.GRAY)) + .append(Component.text("${languageManager.getMessage("velocity.status.label.paperVersion")}: ", NamedTextColor.GRAY)) .append(Component.text(meta.version, NamedTextColor.AQUA)), - ) - - // Protocol version - sender.sendMessage( + // Velocity version (if connected) + velocityConnectionManager.getVelocityVersion()?.let { velocityVersion -> + Component + .text(" • ", NamedTextColor.GRAY) + .append(Component.text("${languageManager.getMessage("velocity.status.label.velocityVersion")}: ", NamedTextColor.GRAY)) + .append(Component.text(velocityVersion, NamedTextColor.AQUA)) + }, + // Protocol version Component .text(" • ", NamedTextColor.GRAY) - .append(Component.text("Protocol Version: ", NamedTextColor.GRAY)) + .append(Component.text("${languageManager.getMessage("velocity.status.label.protocolVersion")}: ", NamedTextColor.GRAY)) .append(Component.text(ProtocolVersion.version, NamedTextColor.AQUA)), - ) - - // Connection state - sender.sendMessage( + // Connection state Component .text(" • ", NamedTextColor.GRAY) - .append(Component.text("Connection State: ", NamedTextColor.GRAY)) + .append(Component.text("${languageManager.getMessage("velocity.status.label.connectionState")}: ", NamedTextColor.GRAY)) .append(stateMessage), - ) - - // Velocity version (if connected) - velocityConnectionManager.getVelocityVersion()?.let { velocityVersion -> - sender.sendMessage( + // Error message (if failed) + velocityConnectionManager.getLastError()?.let { error -> Component .text(" • ", NamedTextColor.GRAY) - .append(Component.text("Velocity Version: ", NamedTextColor.GRAY)) - .append(Component.text(velocityVersion, NamedTextColor.AQUA)), - ) - } + .append(Component.text("${languageManager.getMessage("velocity.status.error")}: ", NamedTextColor.GRAY)) + .append(Component.text(error, NamedTextColor.RED)) + } + ) - // Error message (if failed) - velocityConnectionManager.getLastError()?.let { error -> - sender.sendMessage( - Component - .text(" • ", NamedTextColor.GRAY) - .append(Component.text("Error: ", NamedTextColor.GRAY)) - .append(Component.text(error, NamedTextColor.RED)), + sender.apply { + // Header + sendMessage( + MessageFormatter.format( + languageManager.getMessage("velocity.status.header"), + ), ) + // Connection status details + connectionStatus.forEach { line -> + line?.let { sendMessage(it) } + } } // Live status check (if connected) @@ -131,7 +133,7 @@ class VelocityStatusCommand( sender.sendMessage( Component .text(" • ", NamedTextColor.GRAY) - .append(Component.text("Checking live status...", NamedTextColor.YELLOW)), + .append(Component.text(languageManager.getMessage("velocity.status.checkingLiveStatus"), NamedTextColor.YELLOW)), ) velocityConnectionManager @@ -140,14 +142,14 @@ class VelocityStatusCommand( sender.sendMessage( Component .text(" ✓ ", NamedTextColor.GREEN) - .append(Component.text("Online Players: ", NamedTextColor.GRAY)) + .append(Component.text("${languageManager.getMessage("velocity.status.label.onlinePlayers")}: ", NamedTextColor.GRAY)) .append(Component.text(response.online.toString(), NamedTextColor.YELLOW)), ) }.exceptionally { throwable -> sender.sendMessage( Component .text(" ✗ ", NamedTextColor.RED) - .append(Component.text("Live status check failed: ", NamedTextColor.GRAY)) + .append(Component.text("${languageManager.getMessage("velocity.status.liveStatusFailed")}: ", NamedTextColor.GRAY)) .append(Component.text(throwable.message ?: "Unknown error", NamedTextColor.RED)), ) null diff --git a/platform-paper/src/main/resources/languages/en.yml b/platform-paper/src/main/resources/languages/en.yml index f19c494..06355c6 100644 --- a/platform-paper/src/main/resources/languages/en.yml +++ b/platform-paper/src/main/resources/languages/en.yml @@ -198,14 +198,24 @@ toggle: on: "Enabled" velocity: + state: + disconnected: "Disconnected" + handshaking: "Handshaking..." + connected: "Connected" + failed: "Failed" status: header: "--- LunaticChat Velocity Cooperation Status ---" - paperVersion: "Paper Plugin Version: v{version}" - velocityVersion: "Velocity Plugin Version: v{version}" - protocolVersion: "Protocol Version: v{version}" - connectionState: "Connection State" error: "Error" checkingLiveStatus: "Checking live status..." - liveStatusSuccess: "Live status: Velocity v{version}, Protocol v{protocol}, Online: {online}" liveStatusFailed: "Live status check failed" - + label: + paperVersion: "Paper Version" + velocityVersion: "Velocity Version" + protocolVersion: "Protocol Version" + connectionState: "Connection State" + onlinePlayers: "Online Players" + hoverInfo: + disconnected: "The connection between LunaticChat and the Velocity server is disconnected. A server restart is required to reconnect" + handshaking: "Currently establishing connection between LunaticChat and the Velocity server. Integration features are unavailable until the connection is complete" + connected: "LunaticChat is successfully connected to the Velocity server. Integration features are available" + failed: "Failed to establish connection between LunaticChat and the Velocity server. A server restart is required to reconnect" diff --git a/platform-paper/src/main/resources/languages/ja.yml b/platform-paper/src/main/resources/languages/ja.yml index ed02f5a..1b46354 100644 --- a/platform-paper/src/main/resources/languages/ja.yml +++ b/platform-paper/src/main/resources/languages/ja.yml @@ -198,13 +198,24 @@ toggle: off: "無効" velocity: + state: + disconnected: "切断済み" + handshaking: "ハンドシェイク中..." + connected: "接続済み" + failed: "接続失敗" status: header: "--- LunaticChat Velocity 連携ステータス ---" - paperVersion: "Paper プラグインバージョン: v{version}" - velocityVersion: "Velocity プラグインバージョン: v{version}" - protocolVersion: "プロトコルバージョン: v{version}" - connectionState: "接続状態" error: "エラー" checkingLiveStatus: "ライブステータスを確認中..." - liveStatusSuccess: "ライブステータス: Velocity v{version}, プロトコル v{protocol}, オンライン: {online}" liveStatusFailed: "ライブステータスチェックに失敗しました" + label: + paperVersion: "Paper バージョン" + velocityVersion: "Velocity バージョン" + protocolVersion: "プロトコルバージョン" + connectionState: "接続状態" + onlinePlayers: "オンラインプレイヤー" + hoverInfo: + disconnected: "LunaticChat と Velocity サーバ間の接続が切断されています。再接続するにはサーバを再起動する必要があります" + handshaking: "現在 LunaticChat と Velocity サーバ間の接続を確立中です。接続が完了するまで各種連携機能は利用できません" + connected: "LunaticChat は Velocity サーバと正常に接続されています。各種連携機能が利用可能です" + failed: "LunaticChat と Velocity サーバ間の接続に失敗しました。再接続するにはサーバを再起動する必要があります" -- cgit v1.2.1 From 90464e38992ac9affd7968f3833d8d3cc948ae1a Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:21:08 +0900 Subject: feat: Improve Velocity Integration Errors --- .../m1sk9/lunaticChat/paper/ServiceInitializer.kt | 15 +---- .../command/impl/lcv/VelocityStatusCommand.kt | 64 ++++++++++++---------- platform-paper/src/main/resources/languages/en.yml | 7 ++- platform-paper/src/main/resources/languages/ja.yml | 7 ++- 4 files changed, 45 insertions(+), 48 deletions(-) diff --git a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/ServiceInitializer.kt b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/ServiceInitializer.kt index dc015ed..0af6ed8 100644 --- a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/ServiceInitializer.kt +++ b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/ServiceInitializer.kt @@ -395,24 +395,13 @@ class ServiceInitializer( } is VelocityConnectionManager.HandshakeResult.Error -> { logger.severe("Velocity handshake failed: ${result.message}") - logger.severe("Disabling plugin due to Velocity integration failure") - plugin.server.scheduler.runTask( - plugin, - Runnable { - plugin.server.pluginManager.disablePlugin(plugin) - }, - ) + logger.severe("Velocity integration is disabled. Use /lcv status to check the status.") } } }.exceptionally { throwable -> logger.severe("Velocity handshake exception: ${throwable.message}") + logger.severe("Velocity integration is disabled. Use /lcv status to check the status.") throwable.printStackTrace() - plugin.server.scheduler.runTask( - plugin, - Runnable { - plugin.server.pluginManager.disablePlugin(plugin) - }, - ) null } } diff --git a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt index 7845fe8..fbbe113 100644 --- a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt +++ b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt @@ -7,7 +7,6 @@ import dev.m1sk9.lunaticChat.engine.protocol.ProtocolVersion import dev.m1sk9.lunaticChat.paper.LunaticChat import dev.m1sk9.lunaticChat.paper.command.annotation.Command import dev.m1sk9.lunaticChat.paper.command.annotation.Permission -import dev.m1sk9.lunaticChat.paper.command.annotation.PlayerOnly import dev.m1sk9.lunaticChat.paper.command.core.CommandContext import dev.m1sk9.lunaticChat.paper.command.core.LunaticCommand import dev.m1sk9.lunaticChat.paper.i18n.LanguageManager @@ -29,7 +28,6 @@ import net.kyori.adventure.text.format.NamedTextColor description = "Velocity integration status", ) @Permission(LunaticChatPermissionNode.VelocityStatus::class) -@PlayerOnly class VelocityStatusCommand( plugin: LunaticChat, private val velocityConnectionManager: VelocityConnectionManager, @@ -46,15 +44,14 @@ class VelocityStatusCommand( .literal("status") .executes { ctx -> val context = wrapContext(ctx) - checkPlayerOnly(context)?.let { return@executes handleResult(context, it) } - val result = execute(context) handleResult(context, result) }, ) private fun execute(ctx: CommandContext): CommandResult { - val sender = ctx.requirePlayer() + val sender = ctx.sender + val player = ctx.player val meta = plugin.pluginMeta // Connection state @@ -128,32 +125,41 @@ class VelocityStatusCommand( } } - // Live status check (if connected) + // Live status check (only available for players when connected) if (state == VelocityConnectionManager.ConnectionState.CONNECTED) { - sender.sendMessage( - Component - .text(" • ", NamedTextColor.GRAY) - .append(Component.text(languageManager.getMessage("velocity.status.checkingLiveStatus"), NamedTextColor.YELLOW)), - ) + if (player != null) { + sender.sendMessage( + Component + .text(" • ", NamedTextColor.GRAY) + .append(Component.text(languageManager.getMessage("velocity.status.checkingLiveStatus"), NamedTextColor.YELLOW)), + ) - velocityConnectionManager - .requestStatus(sender) - .thenAccept { response -> - sender.sendMessage( - Component - .text(" ✓ ", NamedTextColor.GREEN) - .append(Component.text("${languageManager.getMessage("velocity.status.label.onlinePlayers")}: ", NamedTextColor.GRAY)) - .append(Component.text(response.online.toString(), NamedTextColor.YELLOW)), - ) - }.exceptionally { throwable -> - sender.sendMessage( - Component - .text(" ✗ ", NamedTextColor.RED) - .append(Component.text("${languageManager.getMessage("velocity.status.liveStatusFailed")}: ", NamedTextColor.GRAY)) - .append(Component.text(throwable.message ?: "Unknown error", NamedTextColor.RED)), - ) - null - } + velocityConnectionManager + .requestStatus(player) + .thenAccept { response -> + sender.sendMessage( + Component + .text(" ✓ ", NamedTextColor.GREEN) + .append(Component.text("${languageManager.getMessage("velocity.status.label.onlinePlayers")}: ", NamedTextColor.GRAY)) + .append(Component.text(response.online.toString(), NamedTextColor.YELLOW)), + ) + }.exceptionally { throwable -> + sender.sendMessage( + Component + .text(" ✗ ", NamedTextColor.RED) + .append(Component.text("${languageManager.getMessage("velocity.status.liveStatusFailed")}: ", NamedTextColor.GRAY)) + .append(Component.text(throwable.message ?: "Unknown error", NamedTextColor.RED)), + ) + null + } + } else { + // Console cannot perform live status check + sender.sendMessage( + Component + .text(" • ", NamedTextColor.GRAY) + .append(Component.text(languageManager.getMessage("velocity.status.consoleNoLiveStatus"), NamedTextColor.GRAY)), + ) + } } return CommandResult.Success diff --git a/platform-paper/src/main/resources/languages/en.yml b/platform-paper/src/main/resources/languages/en.yml index 06355c6..e3dcf91 100644 --- a/platform-paper/src/main/resources/languages/en.yml +++ b/platform-paper/src/main/resources/languages/en.yml @@ -208,6 +208,7 @@ velocity: error: "Error" checkingLiveStatus: "Checking live status..." liveStatusFailed: "Live status check failed" + consoleNoLiveStatus: "Live status check is not available from console (execute as a player)" label: paperVersion: "Paper Version" velocityVersion: "Velocity Version" @@ -216,6 +217,6 @@ velocity: onlinePlayers: "Online Players" hoverInfo: disconnected: "The connection between LunaticChat and the Velocity server is disconnected. A server restart is required to reconnect" - handshaking: "Currently establishing connection between LunaticChat and the Velocity server. Integration features are unavailable until the connection is complete" - connected: "LunaticChat is successfully connected to the Velocity server. Integration features are available" - failed: "Failed to establish connection between LunaticChat and the Velocity server. A server restart is required to reconnect" + handshaking: "Currently establishing connection between LunaticChat and the Velocity server" + connected: "LunaticChat is successfully connected to the Velocity server" + failed: "Failed to establish connection between LunaticChat and the Velocity server. You need to resolve the error to reconnect" diff --git a/platform-paper/src/main/resources/languages/ja.yml b/platform-paper/src/main/resources/languages/ja.yml index 1b46354..e9894f1 100644 --- a/platform-paper/src/main/resources/languages/ja.yml +++ b/platform-paper/src/main/resources/languages/ja.yml @@ -208,6 +208,7 @@ velocity: error: "エラー" checkingLiveStatus: "ライブステータスを確認中..." liveStatusFailed: "ライブステータスチェックに失敗しました" + consoleNoLiveStatus: "ライブステータスチェックはコンソールからは利用できません (プレイヤーとして実行してください)" label: paperVersion: "Paper バージョン" velocityVersion: "Velocity バージョン" @@ -216,6 +217,6 @@ velocity: onlinePlayers: "オンラインプレイヤー" hoverInfo: disconnected: "LunaticChat と Velocity サーバ間の接続が切断されています。再接続するにはサーバを再起動する必要があります" - handshaking: "現在 LunaticChat と Velocity サーバ間の接続を確立中です。接続が完了するまで各種連携機能は利用できません" - connected: "LunaticChat は Velocity サーバと正常に接続されています。各種連携機能が利用可能です" - failed: "LunaticChat と Velocity サーバ間の接続に失敗しました。再接続するにはサーバを再起動する必要があります" + handshaking: "現在 LunaticChat と Velocity サーバ間の接続を確立中です" + connected: "LunaticChat は Velocity サーバと正常に接続されています" + failed: "LunaticChat と Velocity サーバ間の接続に失敗しました。再接続するにはエラーを解決する必要があります" -- cgit v1.2.1 From 13e4625859541001b794b7739d7876f2716d0c9f Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:30:53 +0900 Subject: docs: Update Permission guide --- docs/src/en/reference/permissions.md | 54 ++++++++++++++++++++++++++++++++++++ docs/src/reference/permissions.md | 6 ++++ 2 files changed, 60 insertions(+) diff --git a/docs/src/en/reference/permissions.md b/docs/src/en/reference/permissions.md index 65825c1..81118de 100644 --- a/docs/src/en/reference/permissions.md +++ b/docs/src/en/reference/permissions.md @@ -20,6 +20,12 @@ Receives LunaticChat update notifications. [You must have `checkForUpdates` enabled](../guide/admin/configuration.md#checkforupdates) to receive notifications. +### `lunaticchat.channelbypass` + +- Default: `OP` + +Bypasses moderation features and restrictions on private channels. + ## `lunaticchat.command.*` ### `lunaticchat.command.tell` @@ -94,12 +100,54 @@ Toggles the use of the [`/lc channel switch`](commands/lc/channel.md) command. Toggles the use of the [`/lc channel status`](commands/lc/channel.md) command. +### `lunaticchat.command.lc.channel.info` + +- Default: `non OP` + +Toggles the use of the [`/lc channel info`](commands/lc/channel.md) command. + ### `lunaticchat.command.lc.channel.delete` - Default: `non OP` Toggles the use of the [`/lc channel delete`](commands/lc/channel.md) command. +### `lunaticchat.command.lc.channel.invite` + +- Default: `non OP` + +Toggles the use of the [`/lc channel invite`](commands/lc/channel.md) command. + +### `lunaticchat.command.lc.channel.kick` + +- Default: `non OP` + +Toggles the use of the [`/lc channel kick`](commands/lc/channel.md) command. + +### `lunaticchat.command.lc.channel.ban` + +- Default: `non OP` + +Toggles the use of the [`/lc channel ban`](commands/lc/channel.md) command. + +### `lunaticchat.command.lc.channel.unban` + +- Default: `non OP` + +Toggles the use of the [`/lc channel unban`](commands/lc/channel.md) command. + +### `lunaticchat.command.lc.channel.mod` + +- Default: `non OP` + +Toggles the use of the [`/lc channel mod`](commands/lc/channel.md) command. + +### `lunaticchat.command.lc.channel.ownership` + +- Default: `non OP` + +Toggles the use of the [`/lc channel ownership`](commands/lc/channel.md) command. + ### `lunaticchat.command.lc.chatmode` - Default: `non OP` @@ -112,6 +160,12 @@ Toggles the use of the [`/lc chatmode`](commands/lc/chatmode.md) command. Toggles the use of the [`/lc chatmode toggle`](commands/lc/chatmode.md) command. +### `lunaticchat.command.lcv.status` + +- Default: `non OP` + +Toggles the use of the [`/lcv status`](commands/lcv/status.md) command. + ### `lunaticchat.command.jp` - Default: `non OP` diff --git a/docs/src/reference/permissions.md b/docs/src/reference/permissions.md index fb30a36..85b13ea 100644 --- a/docs/src/reference/permissions.md +++ b/docs/src/reference/permissions.md @@ -160,6 +160,12 @@ LunaticChat のアップデート通知を受け取ります. [`/lc chatmode toggle`](commands/lc/chatmode.md) コマンドの使用を切り替えます. +### `lunaticchat.command.lcv.status` + +- Default: `non OP` + +[`/lcv status`](commands/lcv/status.md) コマンドの使用を切り替えます. + ### `lunaticchat.command.jp` - Default: `non OP` -- cgit v1.2.1 From e91f1ca1397a9ca90481aa7ef9c45646bb11b0cd Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:31:13 +0900 Subject: docs: Update Velocity guide --- docs/src/en/guide/admin/velocity.md | 35 ++++++++++++++++------------------- docs/src/guide/admin/velocity.md | 34 ++++++++++++++++------------------ 2 files changed, 32 insertions(+), 37 deletions(-) diff --git a/docs/src/en/guide/admin/velocity.md b/docs/src/en/guide/admin/velocity.md index 6a4e6f7..e1f9aa0 100644 --- a/docs/src/en/guide/admin/velocity.md +++ b/docs/src/en/guide/admin/velocity.md @@ -21,13 +21,8 @@ To enable Velocity integration, follow these steps: For Velocity and Paper's LunaticChat to integrate correctly, both plugin versions and protocol versions must be compatible. - Ensure that the LunaticChat versions on Velocity and Paper sides are the same. - - Generally, the same version of LunaticChat is compatible. - - Releases are made simultaneously for Velocity and Paper versions, so version numbers will not differ. - - However, compatibility may not be guaranteed when using beta or development versions. + - Compatibility may not be guaranteed when using beta or development versions. - Ensure that protocol versions match. - - LunaticChat uses protocol versions to ensure compatibility between different versions. - - Verify that the protocol versions of LunaticChat on Velocity and Paper sides match. - - Note that when protocol versions change, it is considered a **breaking change**, requiring simultaneous updates of both Velocity and Paper versions of LunaticChat. ::: danger Regarding LunaticChat versions prior to v0.7.0 @@ -37,34 +32,36 @@ They cannot be used together, so if you are using LunaticChat prior to v0.7.0, d ::: -::: tip Version Rules +## How to Check Integration Status + +To verify that Velocity integration is working properly, use the `/lcv status` command. + +The current protocol version and connection state will be displayed. + +::: warning Behavior When Versions Mismatch -LunaticChat follows these version rules: +When the version or protocol version does not match, the Velocity integration feature is disabled, but **the plugin itself continues to operate**. -- Plugin version: Exact match required - - Paper 0.7.0, Velocity 0.7.0 → ✓ PASS - - Paper 0.7.0, Velocity 0.6.0 → ✗ FAIL -- Protocol version: MAJOR.MINOR must match - - Paper 1.0.0, Velocity 1.0.1 → ✓ PASS (PATCH difference is OK) - - Paper 1.0.0, Velocity 1.1.0 → ✗ FAIL (MINOR difference) - - Paper 1.0.0, Velocity 2.0.0 → ✗ FAIL (MAJOR difference) +You can check the connection state and error details using the `/lcv status` command. To reconnect, ensure that the LunaticChat version / protocol version on Velocity and Paper sides match. ::: -## How to Check Integration Status +::: tip About Velocity Integration Timing -To verify that Velocity integration is working properly, use the `/lcv status` command. +LunaticChat connects to Velocity **when the first player joins the server** after startup. -The current protocol version and connection state will be displayed. +Therefore, if you run the `/lcv status` command immediately after server startup, the Velocity integration may not be established yet. + +::: ## Troubleshooting If you encounter issues with Velocity integration, check the following: +- **Run the `/lcv status` command to check the connection state**. If there are errors such as version mismatches, an error message will be displayed. - Ensure that the LunaticChat version / protocol version on Velocity and Paper sides are the same. - Verify that LunaticChat settings are correct. - Ensure that network connection between Velocity server and Paper servers is working properly. -- Check LunaticChat logs for error messages or warnings. ## Cross-Server Chat diff --git a/docs/src/guide/admin/velocity.md b/docs/src/guide/admin/velocity.md index d6de2c6..2b07ddb 100644 --- a/docs/src/guide/admin/velocity.md +++ b/docs/src/guide/admin/velocity.md @@ -21,13 +21,8 @@ Velocity 連携を有効化するには以下の手順を行います: Velocity と Paper の LunaticChat が正しく連携するには,両方のプラグインバージョン・プロトコルバージョンが互換性のあるものである必要があります. - Velocity 側と Paper 側の LunaticChat のバージョンが同じであることを確認してください. - - 基本的に,同じバージョンの LunaticChat は互換性があります. - - リリースは Velocity 版・Paper 版 で同時に行われるため,バージョン番号が異なることはありません. - - ただし,ベータ版や開発版を使用している場合,互換性が保証されないことがあります. + - ベータ版や開発版を使用している場合,互換性が保証されないことがあります. - プロトコルバージョンが一致していることを確認してください. - - LunaticChat は,異なるバージョン間での互換性を確保するために,プロトコルバージョンを使用しています. - - Velocity 側と Paper 側の LunaticChat のプロトコルバージョンが一致していることを確認してください. - - なお,プロトコルバージョンが変わる場合は **破壊的変更** に当たるため,Paper 版の LunaticChat のアップデート時に Velocity 版の LunaticChat も同時にアップデートする必要があります. ::: danger v0.7.0 未満の LunaticChat について @@ -37,30 +32,33 @@ v0.7.0 未満の LunaticChat は Velocity 版との後方互換性はありま ::: -::: tip バージョンルール +## 連携状況の確認方法 + +Velocity 連携が正常に動作しているか確認するには,`/lcv status` コマンドを使用します. + +現在のプロトコルバージョンと接続状態が表示されます. + +::: warning バージョン不一致時の動作 -LunaticChat は以下のバージョンルールに従います. +バージョンやプロトコルバージョンが一致しない場合,Velocity 連携機能は無効化されますが,**プラグイン自体は動作を継続します**. -- プラグインバージョン: 完全一致が必要 - - Paper 0.7.0, Velocity 0.7.0 → ✓ PASS - - Paper 0.7.0, Velocity 0.6.0 → ✗ FAIL -- プロトコルバージョン: MAJOR.MINOR が一致する必要あり - - Paper 1.0.0, Velocity 1.0.1 → ✓ PASS (PATCH の違いは OK) - - Paper 1.0.0, Velocity 1.1.0 → ✗ FAIL (MINOR の違い) - - Paper 1.0.0, Velocity 2.0.0 → ✗ FAIL (MAJOR の違い) +`/lcv status` コマンドで接続状態とエラー内容を確認できます.再接続するには Velocity 側と Paper 側の LunaticChat のバージョン / プロトコルバージョンを一致させてください. ::: -## 連携状況の確認方法 +::: tip Velocity との連携タイミングについて -Velocity 連携が正常に動作しているか確認するには,`/lcv status` コマンドを使用します. +LunaticChat が Velocity と連携するタイミングは,起動後 **最初のプレイヤーがサーバーに接続したとき** に行われます. -現在のプロトコルバージョンと接続状態が表示されます. +そのため,サーバー起動直後に `/lcv status` コマンドを実行しても,まだ Velocity との連携が確立されていない場合があります. + +::: ## トラブルシューティング Velocity 連携に関する問題が発生した場合,以下の点を確認してください: +- **`/lcv status` コマンドを実行して接続状態を確認してください**.バージョン不一致などのエラーがある場合は,エラーメッセージが表示されます. - Velocity 側と Paper 側の LunaticChat のバージョン / プロトコルバージョンが同じであることを確認してください. - LunaticChat の設定が正しいことを確認してください. - Velocity サーバーと Paper サーバー間のネットワーク接続が正常であることを確認してください. -- cgit v1.2.1 From 239de463ee63bb85e0aab88925efb23f845346ef Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:31:21 +0900 Subject: docs: Add Changelog --- CHANGELOG.md | 7 +++ .../command/impl/lcv/VelocityStatusCommand.kt | 72 ++++++++++++---------- 2 files changed, 48 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ebe45c..8cdb717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ ### v0.8.1 - Modrinth releases are now split per Loader. +- When LunaticChat for Velocity fails to launch due to version mismatch, enable the plugin to run standalone without modification +- Prevent `/lcv status` from becoming disabled when Velocity integration fails due to version mismatch +- Enable checking Velocity integration errors via `/lcv status` +- Add hover text to `/lcv status` indicating current integration status +- Fixed an issue where metadata linked to the Velocity version of LunaticChat build was incorrect. +- Enabled execution of `/lcv status` from the console. + - Live status display requires the Player API and is therefore not supported. ### v0.8.0 diff --git a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt index fbbe113..fe43325 100644 --- a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt +++ b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt @@ -80,37 +80,39 @@ class VelocityStatusCommand( } } - val connectionStatus: List = listOf( - // Paper plugin version - Component - .text(" • ", NamedTextColor.GRAY) - .append(Component.text("${languageManager.getMessage("velocity.status.label.paperVersion")}: ", NamedTextColor.GRAY)) - .append(Component.text(meta.version, NamedTextColor.AQUA)), - // Velocity version (if connected) - velocityConnectionManager.getVelocityVersion()?.let { velocityVersion -> + val connectionStatus: List = + listOf( + // Paper plugin version Component .text(" • ", NamedTextColor.GRAY) - .append(Component.text("${languageManager.getMessage("velocity.status.label.velocityVersion")}: ", NamedTextColor.GRAY)) - .append(Component.text(velocityVersion, NamedTextColor.AQUA)) - }, - // Protocol version - Component - .text(" • ", NamedTextColor.GRAY) - .append(Component.text("${languageManager.getMessage("velocity.status.label.protocolVersion")}: ", NamedTextColor.GRAY)) - .append(Component.text(ProtocolVersion.version, NamedTextColor.AQUA)), - // Connection state - Component - .text(" • ", NamedTextColor.GRAY) - .append(Component.text("${languageManager.getMessage("velocity.status.label.connectionState")}: ", NamedTextColor.GRAY)) - .append(stateMessage), - // Error message (if failed) - velocityConnectionManager.getLastError()?.let { error -> + .append(Component.text("${languageManager.getMessage("velocity.status.label.paperVersion")}: ", NamedTextColor.GRAY)) + .append(Component.text(meta.version, NamedTextColor.AQUA)), + // Velocity version (if connected) + velocityConnectionManager.getVelocityVersion()?.let { velocityVersion -> + Component + .text(" • ", NamedTextColor.GRAY) + .append( + Component.text("${languageManager.getMessage("velocity.status.label.velocityVersion")}: ", NamedTextColor.GRAY), + ).append(Component.text(velocityVersion, NamedTextColor.AQUA)) + }, + // Protocol version Component .text(" • ", NamedTextColor.GRAY) - .append(Component.text("${languageManager.getMessage("velocity.status.error")}: ", NamedTextColor.GRAY)) - .append(Component.text(error, NamedTextColor.RED)) - } - ) + .append(Component.text("${languageManager.getMessage("velocity.status.label.protocolVersion")}: ", NamedTextColor.GRAY)) + .append(Component.text(ProtocolVersion.version, NamedTextColor.AQUA)), + // Connection state + Component + .text(" • ", NamedTextColor.GRAY) + .append(Component.text("${languageManager.getMessage("velocity.status.label.connectionState")}: ", NamedTextColor.GRAY)) + .append(stateMessage), + // Error message (if failed) + velocityConnectionManager.getLastError()?.let { error -> + Component + .text(" • ", NamedTextColor.GRAY) + .append(Component.text("${languageManager.getMessage("velocity.status.error")}: ", NamedTextColor.GRAY)) + .append(Component.text(error, NamedTextColor.RED)) + }, + ) sender.apply { // Header @@ -140,15 +142,23 @@ class VelocityStatusCommand( sender.sendMessage( Component .text(" ✓ ", NamedTextColor.GREEN) - .append(Component.text("${languageManager.getMessage("velocity.status.label.onlinePlayers")}: ", NamedTextColor.GRAY)) - .append(Component.text(response.online.toString(), NamedTextColor.YELLOW)), + .append( + Component.text( + "${languageManager.getMessage("velocity.status.label.onlinePlayers")}: ", + NamedTextColor.GRAY, + ), + ).append(Component.text(response.online.toString(), NamedTextColor.YELLOW)), ) }.exceptionally { throwable -> sender.sendMessage( Component .text(" ✗ ", NamedTextColor.RED) - .append(Component.text("${languageManager.getMessage("velocity.status.liveStatusFailed")}: ", NamedTextColor.GRAY)) - .append(Component.text(throwable.message ?: "Unknown error", NamedTextColor.RED)), + .append( + Component.text( + "${languageManager.getMessage("velocity.status.liveStatusFailed")}: ", + NamedTextColor.GRAY, + ), + ).append(Component.text(throwable.message ?: "Unknown error", NamedTextColor.RED)), ) null } -- cgit v1.2.1 From d767e3063c18152d8295e9273b7d63dbbc3ed8d6 Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:52:08 +0900 Subject: docs: Fix permission guide and changelog --- CHANGELOG.md | 2 +- docs/src/en/reference/permissions.md | 2 +- docs/src/reference/permissions.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cdb717..e64ae6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### v0.8.1 - Modrinth releases are now split per Loader. -- When LunaticChat for Velocity fails to launch due to version mismatch, enable the plugin to run standalone without modification +- Allow LunaticChat for Velocity to run standalone when launch fails due to version mismatch - Prevent `/lcv status` from becoming disabled when Velocity integration fails due to version mismatch - Enable checking Velocity integration errors via `/lcv status` - Add hover text to `/lcv status` indicating current integration status diff --git a/docs/src/en/reference/permissions.md b/docs/src/en/reference/permissions.md index 81118de..4508808 100644 --- a/docs/src/en/reference/permissions.md +++ b/docs/src/en/reference/permissions.md @@ -162,7 +162,7 @@ Toggles the use of the [`/lc chatmode toggle`](commands/lc/chatmode.md) command. ### `lunaticchat.command.lcv.status` -- Default: `non OP` +- Default: `OP` Toggles the use of the [`/lcv status`](commands/lcv/status.md) command. diff --git a/docs/src/reference/permissions.md b/docs/src/reference/permissions.md index 85b13ea..5704a50 100644 --- a/docs/src/reference/permissions.md +++ b/docs/src/reference/permissions.md @@ -162,7 +162,7 @@ LunaticChat のアップデート通知を受け取ります. ### `lunaticchat.command.lcv.status` -- Default: `non OP` +- Default: `OP` [`/lcv status`](commands/lcv/status.md) コマンドの使用を切り替えます. -- cgit v1.2.1 From 715d3354493c07053cae53b50257b4117ed926e7 Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:52:41 +0900 Subject: fix: Fix hoverEvent effect --- .../command/impl/lcv/VelocityStatusCommand.kt | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt index fe43325..6ebb4f4 100644 --- a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt +++ b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/command/impl/lcv/VelocityStatusCommand.kt @@ -15,6 +15,7 @@ import dev.m1sk9.lunaticChat.paper.velocity.VelocityConnectionManager import io.papermc.paper.command.brigadier.CommandSourceStack import io.papermc.paper.command.brigadier.Commands import net.kyori.adventure.text.Component +import net.kyori.adventure.text.event.HoverEvent import net.kyori.adventure.text.format.NamedTextColor /** @@ -61,22 +62,38 @@ class VelocityStatusCommand( VelocityConnectionManager.ConnectionState.DISCONNECTED -> { Component .text(languageManager.getMessage("velocity.state.disconnected"), NamedTextColor.GRAY) - .hoverEvent(Component.text(languageManager.getMessage("velocity.hoverInfo.disconnected"), NamedTextColor.GRAY)) + .hoverEvent( + HoverEvent.showText( + Component.text(languageManager.getMessage("velocity.hoverInfo.disconnected"), NamedTextColor.GRAY), + ), + ) } VelocityConnectionManager.ConnectionState.HANDSHAKING -> { Component .text(languageManager.getMessage("velocity.state.handshaking"), NamedTextColor.YELLOW) - .hoverEvent(Component.text(languageManager.getMessage("velocity.hoverInfo.handshaking"), NamedTextColor.YELLOW)) + .hoverEvent( + HoverEvent.showText( + Component.text(languageManager.getMessage("velocity.hoverInfo.handshaking"), NamedTextColor.YELLOW), + ), + ) } VelocityConnectionManager.ConnectionState.CONNECTED -> { Component .text(languageManager.getMessage("velocity.state.connected"), NamedTextColor.GREEN) - .hoverEvent(Component.text(languageManager.getMessage("velocity.hoverInfo.connected"), NamedTextColor.GREEN)) + .hoverEvent( + HoverEvent.showText( + Component.text(languageManager.getMessage("velocity.hoverInfo.connected"), NamedTextColor.GREEN), + ), + ) } VelocityConnectionManager.ConnectionState.FAILED -> { Component .text(languageManager.getMessage("velocity.state.failed"), NamedTextColor.RED) - .hoverEvent(Component.text(languageManager.getMessage("velocity.hoverInfo.failed"), NamedTextColor.RED)) + .hoverEvent( + HoverEvent.showText( + Component.text(languageManager.getMessage("velocity.hoverInfo.failed"), NamedTextColor.RED), + ), + ) } } -- cgit v1.2.1 From 71f63153304dc17a5c5a5ba9625397be6287edb6 Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Wed, 11 Feb 2026 05:53:59 +0900 Subject: chore: Bump version v0.9.0 --- CHANGELOG.md | 2 +- build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e64ae6a..ee7970e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## v0 -### v0.8.1 +### v0.9.0 - Modrinth releases are now split per Loader. - Allow LunaticChat for Velocity to run standalone when launch fails due to version mismatch diff --git a/build.gradle.kts b/build.gradle.kts index b0155d3..73e1c27 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ plugins { allprojects { group = "dev.m1sk9" - version = "0.8.1" + version = "0.9.0" repositories { mavenCentral() -- cgit v1.2.1