Files
Purpur/patches/server/0263-Allow-custom-ChatDecorators.patch
granny e4d30e02fd Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@e84621a [ci skip] Add more patch identifying comments
PaperMC/Paper@c0e4697 [ci skip] Add more patch identifying comments
PaperMC/Paper@17275ff [ci skip] add more comments & move 1 hunk to correct patch
PaperMC/Paper@78fcb8e [ci skip] Update contributing guidelines to include identifying commit titles in comments (#10162)
PaperMC/Paper@8657cd9 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164)
PaperMC/Paper@c151c95 Fixup AsyncPreLoginEvent patches
PaperMC/Paper@93a848c Readd missed line
PaperMC/Paper@f9fdedf [ci skip] Add more patch identifying comments, merge related patches
PaperMC/Paper@0ef5984 [ci skip] Add more patch identifying comments, merge related patches
2024-01-15 23:22:28 -08:00

28 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Mon, 11 Jul 2022 20:44:19 -0500
Subject: [PATCH] Allow custom ChatDecorators
Requires NMS to utilize. I'll write an API for this once our upstreams calm down with the changes.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3ce0e67c91d3bf6ca30bfb5b1bfaf51fec375827..5cd7cd3fbeb62c4c50b87b9b791004a9cd7651f3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2838,6 +2838,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("Async Chat Thread - #%d").setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build()); // Paper
public ChatDecorator getChatDecorator() {
+ // Purpur start
+ return this.chatDecorator;
+ }
+ public void setChatDecorator(ChatDecorator chatDecorator) {
+ this.chatDecorator = chatDecorator;
+ }
+ private ChatDecorator chatDecorator = getPaperHardcodedChatDecorator();
+ public ChatDecorator getPaperHardcodedChatDecorator() {
+ // Purpur end
// Paper start - moved to ChatPreviewProcessor
return ChatDecorator.create((sender, commandSourceStack, message) -> {
final io.papermc.paper.adventure.ChatDecorationProcessor processor = new io.papermc.paper.adventure.ChatDecorationProcessor(this, sender, commandSourceStack, message);