fix(skin): CustomSkin API should have suffix slash.

This commit is contained in:
huanghongxun
2021-10-10 01:09:41 +08:00
parent ba6eb17a38
commit 32d557ee07
2 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ public class MultiplayerClientServerTest {
@Ignore @Ignore
public void startServer() throws Exception { public void startServer() throws Exception {
Logging.initForTest(); Logging.initForTest();
MultiplayerServer server = new MultiplayerServer(1000); MultiplayerServer server = new MultiplayerServer(1000, true);
server.startServer(44444); server.startServer(44444);
MultiplayerClient client = new MultiplayerClient("username", 44444); MultiplayerClient client = new MultiplayerClient("username", 44444);

View File

@@ -130,7 +130,7 @@ public class Skin {
}); });
case LITTLE_SKIN: case LITTLE_SKIN:
case CUSTOM_SKIN_LOADER_API: case CUSTOM_SKIN_LOADER_API:
String realCslApi = type == Type.LITTLE_SKIN ? "http://mcskin.littleservice.cn" : cslApi; String realCslApi = type == Type.LITTLE_SKIN ? "http://mcskin.littleservice.cn" : StringUtils.removeSuffix(cslApi, "/");
return Task.composeAsync(() -> new GetTask(new URL(String.format("%s/%s.json", realCslApi, username)))) return Task.composeAsync(() -> new GetTask(new URL(String.format("%s/%s.json", realCslApi, username))))
.thenComposeAsync(json -> { .thenComposeAsync(json -> {
SkinJson result = JsonUtils.GSON.fromJson(json, SkinJson.class); SkinJson result = JsonUtils.GSON.fromJson(json, SkinJson.class);