Compare commits

...
Author SHA1 Message Date
Glavo 8e57729349 Update versions.txt (#3744) 2025-03-26 22:55:44 +08:00
Glavo 66ed87eb1e 修复 cslApi 为 null 时启动器崩溃的问题 (#3762) 2025-03-24 02:52:17 +08:00
2 changed files with 20 additions and 1 deletions

No files matched your search

@@ -23,6 +23,7 @@ import org.jackhuang.hmcl.auth.yggdrasil.TextureModel;
import org.jackhuang.hmcl.task.FetchTask;
import org.jackhuang.hmcl.task.GetTask;
import org.jackhuang.hmcl.task.Task;
import org.jackhuang.hmcl.util.Lang;
import org.jackhuang.hmcl.util.StringUtils;
import org.jackhuang.hmcl.util.gson.JsonUtils;
import org.jackhuang.hmcl.util.io.FileUtils;
@@ -165,7 +166,9 @@ public class Skin {
});
case LITTLE_SKIN:
case CUSTOM_SKIN_LOADER_API:
String realCslApi = type == Type.LITTLE_SKIN ? "https://littleskin.cn" : StringUtils.removeSuffix(cslApi, "/");
String realCslApi = type == Type.LITTLE_SKIN
? "https://littleskin.cn"
: StringUtils.removeSuffix(Lang.requireNonNullElse(cslApi, ""), "/");
return Task.composeAsync(() -> new GetTask(new URL(String.format("%s/%s.json", realCslApi, username))))
.thenComposeAsync(json -> {
SkinJson result = JsonUtils.GSON.fromJson(json, SkinJson.class);
@@ -797,3 +797,19 @@
1.21.4-rc2
1.21.4-rc3
1.21.4
25w02a
25w03a
25w04a
25w05a
25w06a
25w07a
25w08a
25w09a
25w09b
25w10a
1.21.5-pre1
1.21.5-pre2
1.21.5-pre3
1.21.5-rc1
1.21.5-rc2
1.21.5