From 46be0dcaf35a3976db80033d307e4d268341a6f5 Mon Sep 17 00:00:00 2001 From: Riley Park Date: Tue, 23 Feb 2021 16:48:02 -0800 Subject: [PATCH] Display name should never be null --- Spigot-Server-Patches/Adventure.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Adventure.patch b/Spigot-Server-Patches/Adventure.patch index c564347641..82c501d7bd 100644 --- a/Spigot-Server-Patches/Adventure.patch +++ b/Spigot-Server-Patches/Adventure.patch @@ -1842,7 +1842,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void setDisplayName(final String name) { -+ this.getHandle().adventure$displayName = name != null ? io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(name) : null; if (true) return; // Paper ++ this.getHandle().adventure$displayName = name != null ? io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(name) : net.kyori.adventure.text.Component.text(this.getName()); if (true) return; // Paper getHandle().displayName = name == null ? getName() : name; } @@ -2026,7 +2026,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public void displayName(final net.kyori.adventure.text.Component displayName) { -+ this.getHandle().adventure$displayName = displayName; ++ this.getHandle().adventure$displayName = displayName != null ? displayName : net.kyori.adventure.text.Component.text(this.getName()); + } + + @Override