aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0008-Adventure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0008-Adventure.patch')
-rw-r--r--patches/server/0008-Adventure.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/server/0008-Adventure.patch b/patches/server/0008-Adventure.patch
index c721cded2e..cbacc69eba 100644
--- a/patches/server/0008-Adventure.patch
+++ b/patches/server/0008-Adventure.patch
@@ -788,6 +788,31 @@ index 0000000000000000000000000000000000000000..2a08e0461db4e699b7e6a1558a4419c8
+ return net.minecraft.network.chat.Component.Serializer.fromJson(GsonComponentSerializer.gson().serializer().toJsonTree(component));
+ }
+}
+diff --git a/src/main/java/io/papermc/paper/adventure/providers/ComponentLoggerProviderImpl.java b/src/main/java/io/papermc/paper/adventure/providers/ComponentLoggerProviderImpl.java
+new file mode 100644
+index 0000000000000000000000000000000000000000..c3631efda9c7fa531a8a9f18fbee7b5f8655382b
+--- /dev/null
++++ b/src/main/java/io/papermc/paper/adventure/providers/ComponentLoggerProviderImpl.java
+@@ -0,0 +1,19 @@
++package io.papermc.paper.adventure.providers;
++
++import io.papermc.paper.adventure.PaperAdventure;
++import net.kyori.adventure.text.Component;
++import net.kyori.adventure.text.logger.slf4j.ComponentLogger;
++import net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider;
++import org.jetbrains.annotations.NotNull;
++import org.slf4j.LoggerFactory;
++
++public class ComponentLoggerProviderImpl implements ComponentLoggerProvider {
++ @Override
++ public @NotNull ComponentLogger logger(@NotNull LoggerHelper helper, @NotNull String name) {
++ return helper.delegating(LoggerFactory.getLogger(name), this::serialize);
++ }
++
++ private String serialize(final Component message) {
++ return PaperAdventure.asPlain(message, null);
++ }
++}
diff --git a/src/main/java/io/papermc/paper/adventure/providers/GsonComponentSerializerProviderImpl.java b/src/main/java/io/papermc/paper/adventure/providers/GsonComponentSerializerProviderImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..c620d5aa2b0208b769dbe9563f0e99edc9a91047
@@ -3680,6 +3705,13 @@ index 838d5b877c01be3ef353f434d98e27b46c0a3fb4..5c4c0ba05f10d2d83b22d3e86805cfa8
HashSet<Player> reference = new HashSet<Player>(players.size());
for (ServerPlayer player : players) {
reference.add(player.getBukkitEntity());
+diff --git a/src/main/resources/META-INF/services/net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider b/src/main/resources/META-INF/services/net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider
+new file mode 100644
+index 0000000000000000000000000000000000000000..399bde6e57cd82b50d3ebe0f51a3958fa2d52d43
+--- /dev/null
++++ b/src/main/resources/META-INF/services/net.kyori.adventure.text.logger.slf4j.ComponentLoggerProvider
+@@ -0,0 +1 @@
++io.papermc.paper.adventure.providers.ComponentLoggerProviderImpl
diff --git a/src/main/resources/META-INF/services/net.kyori.adventure.text.minimessage.MiniMessage$Provider b/src/main/resources/META-INF/services/net.kyori.adventure.text.minimessage.MiniMessage$Provider
new file mode 100644
index 0000000000000000000000000000000000000000..6ce632b6c9dc5e4b3b978331df51c0ffd1526471