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

Paper Changes:
PaperMC/Paper@b561a12 Fix SuspiciousStewMeta
PaperMC/Paper@9624451 Add missing kick event cause
PaperMC/Paper@6be4395 Migrate paper log ips option to new server.properties option
PaperMC/Paper@2ec643a Readd anti xray and oversized block entity patches
PaperMC/Paper@8d92274 Drop no longer needed patch
PaperMC/Paper@38dc3b2 Optimise chunk tick iteration
PaperMC/Paper@84556f3 Add lag compensation for breaking blocks
PaperMC/Paper@5dca26c Fix race condition on UpgradeData.BlockFixers class init
PaperMC/Paper@ea56138 Fix some issues
PaperMC/Paper@025c5d7 rebuild patches
PaperMC/Paper@866d2d9 Use correct ClientboundLevelChunkWithLightPacket constructor in later patch
PaperMC/Paper@8b9e3dc Optimise nearby player retrieval
PaperMC/Paper@11138a7 Re-add remove streams for Brain AI patch
PaperMC/Paper@7a00758 Rebuild patches
PaperMC/Paper@e284bb1 Updated Upstream (Bukkit/CraftBukkit)
2023-09-24 03:23:36 -07: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 397cb4577f7110178ec63feef114f5eb5d206524..8ae7a35a84f055c982db1bb04697dfebd0512430 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2668,6 +2668,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);