mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@eb0693f Fix EntityDeathEvent cancellation (#9323) PaperMC/Paper@f8cfdd4 Fix SmithingInventory helper slot methods for 1.20 (#9325) PaperMC/Paper@de19eb8 fix incorrectly updated move vector checking patch (#9328) PaperMC/Paper@87dfff4 Implement BossBarViewer on Player (#9332) PaperMC/Paper@2d09115 Use net.kyori.ansi for console logging (#9313) PaperMC/Paper@b48e2e3 Fix dev bundle generation PaperMC/Paper@c287e92 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9301) PaperMC/Paper@2e363c7 1.20.1 (#9333)
28 lines
1.7 KiB
Diff
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 462760b366697979e09ac65ee7787c2ab8338342..a556e23c774c107ab95400a73c9f6a7df6e1bb00 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -2655,6 +2655,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);
|