Browse Source

added isCancelled() method

mastercake10 6 years ago
parent
commit
44725de1f5
1 changed files with 3 additions and 2 deletions
  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]);
 								}