mastercake10 7 vuotta sitten
vanhempi
commit
7ecc39a916
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      de/Linus122/TelegramChat/Main.java

+ 3 - 3
de/Linus122/TelegramChat/Main.java

@@ -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('&', '').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);
 		}
 	}