浏览代码

added isCancelled() method

mastercake10 6 年之前
父节点
当前提交
44725de1f5
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/main/java/de/Linus122/TelegramChat/Telegram.java

+ 3 - 2
src/main/java/de/Linus122/TelegramChat/Telegram.java

@@ -108,8 +108,9 @@ public class Telegram {
 									for (TelegramActionListener actionListener : listeners) {
 										actionListener.onSendToMinecraft(chatMsg);
 									}
-
-									Main.sendToMC(chatMsg);
+									if(!chatMsg.isCancelled()){
+										Main.sendToMC(chatMsg);
+									}
 								} else {
 									this.sendMsg(chat.getId(), Utils.formatMSG("need-to-link")[0]);
 								}