mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-31 04:13:51 -07:00
Fix incorrect colors in some log messages (#5609)
CraftChatMessage.fromComponent fails to take into account the style of TranslatableComponent args, causing any styling on args to be completely ignored. Fixing this is relatively simple, however would cause behavior to deviate from upstream. This commit will fix the coloring in messages logged through MinecraftServer.LOGGER by simply using Adventure's legacy text serializer, which properly serializes TranslatableComponents and their arguments. Note that this doesn't do anything about the underlying issue of CraftChatMessage.fromComponent improperly serializing TranslatableComponents.
This commit is contained in:
@@ -32,9 +32,9 @@ diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -0,0 +0,0 @@ import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufOutputStream;
|
||||
@@ -0,0 +0,0 @@ import io.netty.buffer.ByteBufOutputStream;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.papermc.paper.adventure.PaperAdventure; // Paper
|
||||
import io.papermc.paper.event.entity.EntityMoveEvent;
|
||||
+import io.papermc.paper.util.TraceUtil;
|
||||
import it.unimi.dsi.fastutil.longs.LongIterator;
|
||||
|
Reference in New Issue
Block a user