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());
}
}
@@ -33,6 +33,9 @@ public class ForgeTweaker implements ITweaker {
@Override
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile) {
if (gameDir == null) {
gameDir = new File(".");
}
LogManager.setLogFile(gameDir.toPath().resolve("CustomSkinLoader/CustomSkinLoader.log"));
}
+1 -1
View File
@@ -1,3 +1,3 @@
name=CustomSkinLoader
group=customskinloader
version=14.20
version=14.20.1