From 14518205677e64edf39f344345138ca013316b66 Mon Sep 17 00:00:00 2001 From: Tom <72739475+Tom18314@users.noreply.github.com> Date: Thu, 2 Feb 2023 11:20:37 +0100 Subject: Legacy pattern doesn't detect § symbol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Legacy pattern doesn't detect § symbol which causes error: [Server] ERROR Could not pass event InventoryClickEvent to Quests v3.13.2-82af8a4 [Server] INFO net.kyori.adventure.text.minimessage.internal.parser.ParsingExceptionImpl: Legacy formatting codes have been detected in a MiniMessage string - this is unsupported behaviour. Please refer to the Adventure documentation (https://docs.adventure.kyori.net) for more information. [Server] INFO §cCancel message. --- .../src/main/java/com/leonardobishop/quests/bukkit/util/chat/Chat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bukkit/src') diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/chat/Chat.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/chat/Chat.java index f3a7cb2e..1a9b0709 100644 --- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/chat/Chat.java +++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/chat/Chat.java @@ -36,7 +36,7 @@ public class Chat { questsPlugin.getQuestsLogger().debug("Modern chat is not available, resorting to legacy chat."); miniMessageParser = null; } - legacyPattern = Pattern.compile("&(?:\\d|#|[a-f]|[k-o]|r)"); + legacyPattern = Pattern.compile("(&|§)(?:\\d|#|[a-f]|[k-o]|r)"); } @Contract("null -> null") -- cgit v1.2.3-70-g09d2