From 7ecc39a9167ed47fc7444bf2524632d21cbcf892 Mon Sep 17 00:00:00 2001 From: mastercake10 Date: Sun, 21 May 2017 02:47:19 +0200 Subject: [PATCH] color fixes --- de/Linus122/TelegramChat/Main.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/de/Linus122/TelegramChat/Main.java b/de/Linus122/TelegramChat/Main.java index 860275a..b914366 100755 --- a/de/Linus122/TelegramChat/Main.java +++ b/de/Linus122/TelegramChat/Main.java @@ -93,11 +93,11 @@ public class Main extends JavaPlugin implements Listener{ List recievers = new ArrayList(); recievers.addAll(Main.data.ids); recievers.remove((Object) sender); - String msgF = Main.cfg.getString("chat-format").replace('&', '�').replace("%player%", op.getName()).replace("%message%", msg); + String msgF = Main.cfg.getString("chat-format").replace('&', '§').replace("%player%", op.getName()).replace("%message%", msg); for(int id : recievers){ Telegram.sendMsg(id, msgF); } - Bukkit.broadcastMessage(msgF); + Bukkit.broadcastMessage(msgF.replace("&", "§")); } public static void link(UUID player, int chatID){ @@ -160,7 +160,7 @@ public class Main extends JavaPlugin implements Listener{ if(Telegram.connected){ Chat chat = new Chat(); chat.parse_mode = "Markdown"; - chat.text = e.getPlayer().getName() + ": _" + e.getMessage() + "_"; + chat.text = e.getPlayer().getName() + ": _" + e.getMessage().replaceAll("§.", "") + "_"; Telegram.sendAll(chat); } }