mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
add back pufferfish patches
This commit is contained in:
27
patches/server/0270-Allow-custom-ChatDecorators.patch
Normal file
27
patches/server/0270-Allow-custom-ChatDecorators.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
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 0255f5f21da2a108a25c8a166717706d300b0cae..e5399649e6a34145dfe2154acdd9887ba4f9f1cb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2658,6 +2658,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);
|
||||
Reference in New Issue
Block a user