Make legacyRenderer a ViewerUnaware renderer (#6691)

This commit is contained in:
Jason Penilla 2021-10-02 13:43:03 -05:00
parent 7fc2dfac97
commit 61252d4a4b

View File

@ -316,7 +316,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ 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) {