瀏覽代碼

Merge pull request #15 from FlorianKem/master

Added check for if a chat message got canceled by another plugin.
MasterCake 6 年之前
父節點
當前提交
c421d118e1
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/main/java/de/Linus122/TelegramChat/Main.java

+ 2 - 0
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";