Skip to content

Commit 7af4949

Browse files
authored
更新 QQEvent.java
1 parent 825ae20 commit 7af4949

File tree

1 file changed

+16
-17
lines changed
  • plumbot-bukkit/src/main/java/me/regadpole/plumbot/event/qq

1 file changed

+16
-17
lines changed

plumbot-bukkit/src/main/java/me/regadpole/plumbot/event/qq/QQEvent.java

+16-17
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,6 @@ public void onGroupMessageReceive(GroupMessage e){
194194
}
195195
}
196196

197-
pattern = Pattern.compile(Prefix+".*");
198-
matcher = pattern.matcher(msg);
199-
if(matcher.find()){
200-
if (!Config.SDC()){
201-
return;
202-
}
203-
String scmd = matcher.group().replace(Prefix+"", "");
204-
String gcmd = Config.getCommandsYaml().getString("Admin."+scmd);
205-
if(gcmd!=null) {
206-
PlumBot.getScheduler().runTaskAsynchronously(()->{
207-
String sendCqMsg = ServerManager.sendCmd(gcmd, true);
208-
bot.sendCQMsg(true, sendCqMsg, groupID);
209-
});
210-
return;
211-
}
212-
}
213-
214197
pattern = Pattern.compile(Prefix + "查询白名单 .*");
215198
matcher = pattern.matcher(msg);
216199
if (matcher.find()) {
@@ -256,6 +239,22 @@ public void onGroupMessageReceive(GroupMessage e){
256239
return;
257240
}
258241

242+
pattern = Pattern.compile(Prefix+".*");
243+
matcher = pattern.matcher(msg);
244+
if(matcher.find()){
245+
if (!Config.SDC()){
246+
return;
247+
}
248+
String scmd = matcher.group().replace(Prefix+"", "");
249+
String gcmd = Config.getCommandsYaml().getString("Admin."+scmd);
250+
if(gcmd!=null) {
251+
PlumBot.getScheduler().runTaskAsynchronously(()->{
252+
String sendCqMsg = ServerManager.sendCmd(gcmd, true);
253+
bot.sendCQMsg(true, sendCqMsg, groupID);
254+
});
255+
return;
256+
}
257+
}
259258
}
260259

261260
if(msg.equals(Prefix+"帮助")) {

0 commit comments

Comments
 (0)