SPIGOT-7486: Alternate approach to null profile names

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-09-22 07:36:30 +10:00
parent fb7dc796d5
commit 3ff2a7bc12
7 changed files with 28 additions and 91 deletions

View File

@@ -60,7 +60,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
}
// This might not match lastKnownName but if not it should be more correct
if (profile.getName() != null) {
if (!profile.getName().isEmpty()) {
return profile.getName();
}