diff options
4 files changed, 13 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index fff3c3b..fe764ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,11 +20,12 @@ #### Features -- We have added a notification that appears when you log in to the server while already in a channel. +- Clicking the notification message now displays the channel's status. #### Feature Improvements - Optimization of internal logic. +- We have improved the notification message that appears when you login to the server while in a channel. ### v0.10.1 diff --git a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/PlayerPresenceListener.kt b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/PlayerPresenceListener.kt index 3979246..9ed3cb2 100644 --- a/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/PlayerPresenceListener.kt +++ b/platform-paper/src/main/kotlin/dev/m1sk9/lunaticChat/paper/listener/PlayerPresenceListener.kt @@ -39,12 +39,15 @@ class PlayerPresenceListener( val context = manager.getPlayerChannelContext(player.uniqueId) context?.let { val notification = - MessageFormatter.format( - languageManager.getMessage( - "channel.notification.login", - mapOf("channelName" to it.channel.name), - ), - ) + MessageFormatter + .format( + languageManager.getMessage( + "channel.notification.login", + mapOf("channelName" to it.channel.name), + ), + ).clickEvent( + ClickEvent.runCommand("/lc channel status"), + ) player.sendMessage(notification) } } diff --git a/platform-paper/src/main/resources/languages/en.yml b/platform-paper/src/main/resources/languages/en.yml index d932105..04ca56a 100644 --- a/platform-paper/src/main/resources/languages/en.yml +++ b/platform-paper/src/main/resources/languages/en.yml @@ -132,7 +132,7 @@ channel: noActiveChannel: "You don't have an active channel. Please specify a channel ID" error: "Failed to retrieve channel information" notification: - login: "You are in channel '{channelName}'" + login: "You are currently in the channel '{channelName}'. You can check the channel's status by typing /lc channel status." playerJoined: "{player} joined {channel}" playerLeft: "{player} left {channel}" playerKicked: "{player} was kicked from {channel} by {kicker}" diff --git a/platform-paper/src/main/resources/languages/ja.yml b/platform-paper/src/main/resources/languages/ja.yml index fbf09f9..74f2dfb 100644 --- a/platform-paper/src/main/resources/languages/ja.yml +++ b/platform-paper/src/main/resources/languages/ja.yml @@ -132,7 +132,7 @@ channel: noActiveChannel: "アクティブなチャンネルがありません。チャンネルIDを指定してください" error: "チャンネル情報の取得に失敗しました" notification: - login: "チャンネル '{channelName}' に入室中です" + login: "現在、チャンネル '{channelName}' に入室中です。チャンネルの状態は /lc channel status で確認できます" playerJoined: "{player}がチャンネル {channel} に参加しました" playerLeft: "{player}がチャンネル {channel} から退出しました" playerKicked: "{player}は{kicker}によってチャンネル {channel} から追放されました" |
