Add feature.legacy_skin_api option

This commit is contained in:
yushijinhun 2018-09-23 23:13:40 +08:00
parent 29003c73cb
commit af35eb3ac4
No known key found for this signature in database
GPG key ID: 5BC167F73EA558E4

View file

@ -4,6 +4,7 @@ import java.util.Map;
import moe.yushi.authlibinjector.YggdrasilConfiguration;
import moe.yushi.authlibinjector.httpd.LocalYggdrasilHandle;
import moe.yushi.authlibinjector.util.Logging;
public class LocalYggdrasilApiTransformUnit extends DomainBasedTransformUnit {
@ -13,7 +14,11 @@ public class LocalYggdrasilApiTransformUnit extends DomainBasedTransformUnit {
handle = new LocalYggdrasilHandle(config);
Map<String, String> mapping = getDomainMapping();
mapping.put("skins.minecraft.net", "skins");
if (Boolean.TRUE.equals(config.getMeta().get("feature.legacy_skin_api"))) {
Logging.CONFIG.info("Disabled local redirect for legacy skin API, as the remote Yggdrasil server supports it");
} else {
mapping.put("skins.minecraft.net", "skins");
}
}
@Override