Skip to content

Commit

Permalink
错误修复
Browse files Browse the repository at this point in the history
  • Loading branch information
ApliNi committed Feb 2, 2023
1 parent 430e331 commit 8adcf84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

import static io.github.aplini.chat2qq.utils.Util.formatQQID;
import static io.github.aplini.chat2qq.utils.Util.getNameFromCache;
import static io.github.aplini.chat2qq.utils.Util.*;
import static io.github.aplini.chat2qq.utils.renderGroupMessage._renderMessage;
import static io.github.aplini.chat2qq.utils.renderGroupMessage.renderMessage;
import static org.bukkit.Bukkit.getLogger;
Expand Down Expand Up @@ -52,7 +51,10 @@ public void onGroupMessageReceive(MiraiGroupMessageEvent e) {
if(e.getQuoteReplyMessage() != null){
// 创建回复消息的悬浮文本
String replyMessage = plugin.getConfig().getString("aplini.reply-message.message", "[引用回复]")
.replace("%c_name%", ""+ getNameFromCache(plugin, e.getGroupID(), e.getQuoteReplySenderID(), ""+ e.getQuoteReplySenderID()))
.replace("%c_name%", ""+ cleanupName(
plugin,
getNameFromCache(plugin, e.getGroupID(), e.getQuoteReplySenderID(), ""+ e.getQuoteReplySenderID()),
e.getQuoteReplySenderID()))
.replace("%qq%", ""+ e.getQuoteReplySenderID())
.replace("%_/n_%", "\n")
.replace("%message%", ""+ formatQQID(plugin, _renderMessage(plugin, e.getQuoteReplyMessage()), e.getGroupID()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ else if(config.get("to_all") != null){
public static String getReplyVar(Plugin plugin, MiraiGroupMessageEvent e) {
if(e.getQuoteReplyMessage() != null){
return plugin.getConfig().getString("aplini.reply-message.var", "[reply] ")
.replace("%c_name%", ""+ getNameFromCache(plugin, e.getGroupID(), e.getQuoteReplySenderID(), ""+ e.getQuoteReplySenderID()))
.replace("%c_name%", ""+ cleanupName(
plugin,
getNameFromCache(plugin, e.getGroupID(), e.getQuoteReplySenderID(), ""+ e.getQuoteReplySenderID()),
e.getQuoteReplySenderID()))
.replace("%qq%", ""+ e.getQuoteReplySenderID())
.replace("%_/n_%", "\n");
}
Expand Down

0 comments on commit 8adcf84

Please sign in to comment.