fixed issue #6
This commit is contained in:
parent
2cbd9242b3
commit
de5d0b0d42
@ -175,7 +175,7 @@ public class Main extends JavaPlugin implements Listener{
|
|||||||
if(telegramHook.connected){
|
if(telegramHook.connected){
|
||||||
Chat chat = new Chat();
|
Chat chat = new Chat();
|
||||||
chat.parse_mode = "Markdown";
|
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);
|
telegramHook.sendAll(chat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,6 +133,7 @@ public class Telegram {
|
|||||||
actionListener.onSendToTelegram(chat);
|
actionListener.onSendToTelegram(chat);
|
||||||
}
|
}
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
|
||||||
post("sendMessage", gson.toJson(chat, Chat.class));
|
post("sendMessage", gson.toJson(chat, Chat.class));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user