fix(skin): CustomSkin API should have suffix slash.
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user