fixed issue #6

This commit is contained in:
mastercake10 2018-02-08 20:06:29 +01:00
parent 2cbd9242b3
commit de5d0b0d42
2 changed files with 2 additions and 1 deletions

View File

@ -175,7 +175,7 @@ public class Main extends JavaPlugin implements Listener{
if(telegramHook.connected){
Chat chat = new Chat();
chat.parse_mode = "Markdown";
chat.text = escape(e.getPlayer().getName()) + ": _" + e.getMessage().replaceAll("§.", "") + "_";
chat.text = escape(e.getPlayer().getName()) + ": " + escape(e.getMessage()).replaceAll("§.", "") ;
telegramHook.sendAll(chat);
}
}

View File

@ -133,6 +133,7 @@ public class Telegram {
actionListener.onSendToTelegram(chat);
}
Gson gson = new Gson();
post("sendMessage", gson.toJson(chat, Chat.class));
}