mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 12:11:35 +01:00
Display name should never be null
This commit is contained in:
parent
2233321504
commit
46be0dcaf3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user