Fix NullPointerException (#299)

This commit is contained in:
ZekerZhayard authored and GitHub committed 2024-08-10 20:49:09 +08:00
1 parent 18d31bed8f
commit 3e4b06f5d1
3 files changed
+5 -3

No files matched your search

@@ -85,7 +85,6 @@ public class MinecraftUtil {
}
public static String getCredential(GameProfile profile) {
return (profile == null || profile.hashCode() == 0) ? null :
(profile.getId() == null ? profile.getName() : String.format("%s-%s", profile.getName(), profile.getId()));
return profile == null ? null : String.format("%s-%s", profile.getName(), profile.getId());
}
}