color fixes

This commit is contained in:
mastercake10 2017-05-21 02:47:19 +02:00
parent 0bb21ad153
commit 7ecc39a916

View File

@ -93,11 +93,11 @@ public class Main extends JavaPlugin implements Listener{
List<Integer> recievers = new ArrayList<Integer>();
recievers.addAll(Main.data.ids);
recievers.remove((Object) sender);
String msgF = Main.cfg.getString("chat-format").replace('&', '<EFBFBD>').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);
}
}