Skip to content

Commit db70f02

Browse files
committed
1.4.1 修复第三方插件注入频道无效问题
1 parent bb1603d commit db70f02

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>cn.handyplus.chat</groupId>
88
<artifactId>PlayerChat</artifactId>
9-
<version>1.4.0</version>
9+
<version>1.4.1</version>
1010
<description>一款有点好用的聊天插件</description>
1111

1212
<properties>

src/main/java/cn/handyplus/chat/listener/AsyncPlayerChatEventListener.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ public static boolean blackListCheck(String message) {
233233
*/
234234
private static String getChannel(Player player) {
235235
String channel = ChatConstants.PLAYER_CHAT_CHANNEL.getOrDefault(player.getUniqueId(), ChatConstants.DEFAULT);
236+
// 插件频道直接返回
237+
if (ChatConstants.PLUGIN_CHANNEL.containsKey(channel)) {
238+
return channel;
239+
}
236240
// 是否有对应频道权限 如果没有权限回到默认频道
237241
if (!ChatConstants.DEFAULT.equals(channel) && !player.hasPermission(ChatConstants.PLAYER_CHAT_USE + channel)) {
238242
channel = ChatConstants.DEFAULT;

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: PlayerChat
22
main: cn.handyplus.chat.PlayerChat
3-
version: 1.4.0
3+
version: 1.4.1
44
author: handy
55
api-version: 1.13
66
softdepend: [ PlaceholderAPI,DiscordSRV ]

0 commit comments

Comments
 (0)