From 44725de1f5101c1eff631d6452a8085d8bd3d2ce Mon Sep 17 00:00:00 2001 From: mastercake10 Date: Sun, 20 May 2018 14:34:46 +0200 Subject: [PATCH] added isCancelled() method --- src/main/java/de/Linus122/TelegramChat/Telegram.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/Linus122/TelegramChat/Telegram.java b/src/main/java/de/Linus122/TelegramChat/Telegram.java index d4acaca..ef748cb 100755 --- a/src/main/java/de/Linus122/TelegramChat/Telegram.java +++ b/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]); }