From 147a2b7f54a077447ba5afd74e4f921b497f5205 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 22 Jun 2022 09:15:20 +0100 Subject: [PATCH] Parse MOTD as legacy sectioned string (Fixes #8036) This is not ideal but this is how MOTDs have been parsed for years, ensure that this is performed for all things getting the MOTD from the server --- patches/server/0008-Adventure.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0008-Adventure.patch b/patches/server/0008-Adventure.patch index 03f260907..6ea0a4666 100644 --- a/patches/server/0008-Adventure.patch +++ b/patches/server/0008-Adventure.patch @@ -1839,7 +1839,7 @@ index 595b56b2ab9a813ba71399d306117294fa90dc65..3527d40102d512d0e276edc969ea3c18 } collection = icons; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a888631dc866a784def3e59cd6cc644905f866b3..5251b5d91f4b7d8afc5dc8cf6cbb2820a29594e9 100644 +index a888631dc866a784def3e59cd6cc644905f866b3..9bd413eb9700d33384f2806e957d42613bd6f0f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -588,8 +588,10 @@ public final class CraftServer implements Server { @@ -1958,7 +1958,7 @@ index a888631dc866a784def3e59cd6cc644905f866b3..5251b5d91f4b7d8afc5dc8cf6cbb2820 + // Paper start + @Override + public net.kyori.adventure.text.Component motd() { -+ return io.papermc.paper.adventure.PaperAdventure.asAdventure(net.minecraft.network.chat.Component.literal(console.getMotd())); ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(console.getMotd()); + } + // Paper end @Override