Skip to content

Commit

Permalink
Added check for if a chat message got canceled by another plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlKem committed May 21, 2018
1 parent 44725de commit a29edfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/de/Linus122/TelegramChat/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ public void onQuit(PlayerQuitEvent e) {
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";
Expand Down

0 comments on commit a29edfc

Please sign in to comment.