SPIGOT-7986: Fix inconsistency of serializing profiles with empty names

This commit is contained in:
md_5 2024-12-23 17:15:10 +11:00
parent 372dea1f6e
commit 21b5eaf8fd
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -274,7 +274,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
map.put("uniqueId", this.uniqueId.toString()); map.put("uniqueId", this.uniqueId.toString());
} }
if (this.name != null) { if (this.name != null) {
map.put("name", getName()); map.put("name", this.name);
} }
rebuildDirtyProperties(); rebuildDirtyProperties();
if (!this.properties.isEmpty()) { if (!this.properties.isEmpty()) {