diff --git a/pom.xml b/pom.xml
index 4561c33..1373253 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
pw.yumc
MiaoChat
- 1.8.1
+ 1.8.2
${project.name}
@@ -70,8 +70,9 @@
http://ci.yumc.pw/job/${project.artifactId}/
- §a正式版本 §b${project.version} §a版本
+ §a正式版本 §bv${project.version}
+ §617-05-21 §c修复: BungeeCord未分配分组时报错;
§617-04-07 §c修复: 控制台重复输出聊天信息;
diff --git a/src/main/java/pw/yumc/MiaoChat/MiaoChatBungee.java b/src/main/java/pw/yumc/MiaoChat/MiaoChatBungee.java
index 02b80ec..488e8a3 100644
--- a/src/main/java/pw/yumc/MiaoChat/MiaoChatBungee.java
+++ b/src/main/java/pw/yumc/MiaoChat/MiaoChatBungee.java
@@ -26,11 +26,13 @@ public class MiaoChatBungee extends Plugin implements Listener {
public void handle(final PluginMessageEvent event) {
if (event.getTag().equals(MiaoMessage.CHANNEL) || event.getTag().equals(MiaoMessage.NORMALCHANNEL)) {
InetSocketAddress origin = event.getSender().getAddress();
- groups.get(origin).forEach(server -> {
- if (!server.getAddress().equals(origin) && server.getPlayers().size() > 0) {
- server.sendData(event.getTag(), event.getData());
- }
- });
+ if (groups.containsKey(origin)) {
+ groups.get(origin).forEach(server -> {
+ if (!server.getAddress().equals(origin) && server.getPlayers().size() > 0) {
+ server.sendData(event.getTag(), event.getData());
+ }
+ });
+ }
}
}