From a29edfcf7cd8e177f2b3c76aa7ba072358ba9401 Mon Sep 17 00:00:00 2001 From: FlorianKem Date: Mon, 21 May 2018 14:55:18 +0200 Subject: [PATCH] Added check for if a chat message got canceled by another plugin. --- src/main/java/de/Linus122/TelegramChat/Main.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/de/Linus122/TelegramChat/Main.java b/src/main/java/de/Linus122/TelegramChat/Main.java index 04fc2b0..2a699a4 100755 --- a/src/main/java/de/Linus122/TelegramChat/Main.java +++ b/src/main/java/de/Linus122/TelegramChat/Main.java @@ -192,6 +192,8 @@ public class Main extends JavaPlugin implements Listener { public void onChat(AsyncPlayerChatEvent e) { if (!this.getConfig().getBoolean("enable-chatmessages")) return; + if(e.isCancelled()) + return; if (telegramHook.connected) { ChatMessageToTelegram chat = new ChatMessageToTelegram(); chat.parse_mode = "Markdown";