mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Make legacyRenderer a ViewerUnaware renderer (#6691)
This commit is contained in:
parent
7dd7c0cd9f
commit
bde7b98762
1 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ index 0000000000000000000000000000000000000000..e597a90def72c5903382d7169fb7a2fb
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..4e9e0a39b876c900fdee1343d04a7046f5b3f80e
|
index 0000000000000000000000000000000000000000..185a6d966711628e8937e8ab16f807bffd713c6d
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||||
@@ -0,0 +1,224 @@
|
@@ -0,0 +1,224 @@
|
||||||
|
@ -316,7 +316,7 @@ index 0000000000000000000000000000000000000000..4e9e0a39b876c900fdee1343d04a7046
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private static ChatRenderer legacyRenderer(final String format) {
|
+ private static ChatRenderer legacyRenderer(final String format) {
|
||||||
+ return (player, displayName, message, recipient) -> PaperAdventure.LEGACY_SECTION_UXRC.deserialize(String.format(format, legacyDisplayName((CraftPlayer) player), PaperAdventure.LEGACY_SECTION_UXRC.serialize(message))).replaceText(URL_REPLACEMENT_CONFIG);
|
+ return ChatRenderer.viewerUnaware((player, displayName, message) -> PaperAdventure.LEGACY_SECTION_UXRC.deserialize(String.format(format, legacyDisplayName((CraftPlayer) player), PaperAdventure.LEGACY_SECTION_UXRC.serialize(message))).replaceText(URL_REPLACEMENT_CONFIG));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private void queueIfAsyncOrRunImmediately(final Waitable<Void> waitable) {
|
+ private void queueIfAsyncOrRunImmediately(final Waitable<Void> waitable) {
|
||||||
|
|
Loading…
Reference in a new issue