From 02079482f08c586885497ba5c6a4fec0e6318c2b Mon Sep 17 00:00:00 2001 From: svinerus Date: Sun, 30 Aug 2020 22:06:14 +0300 Subject: [PATCH] version 2.2.2 minecraft doesn't line \n symbol in chat so replace it on a space --- pom.xml | 2 +- src/main/java/ua/kpi/mc/mctotg/Core.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 02b04fa..e734884 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ua.kpi.mc mctotg - 2.2.1 + 2.2.2 jar Mc2TgBridge diff --git a/src/main/java/ua/kpi/mc/mctotg/Core.java b/src/main/java/ua/kpi/mc/mctotg/Core.java index 4473432..034d31d 100644 --- a/src/main/java/ua/kpi/mc/mctotg/Core.java +++ b/src/main/java/ua/kpi/mc/mctotg/Core.java @@ -40,6 +40,7 @@ static void TgToMc(Update update) { } message_text = message_text.replaceAll("[^\\x00-\\x7Fа-яА-ЯёЁіІїЇ]", "✭"); + message_text = message_text.replaceAll("\n", " "); int msg_id = update.message().messageId(); String link = "https://t.me/" + update.message().chat().username() + "/" + msg_id;