Add authlib profile url setting

This commit is contained in:
fullwall 2016-08-02 00:45:11 +08:00
parent f599d33f84
commit 28b0c4fdc3
2 changed files with 3 additions and 2 deletions

View File

@ -57,6 +57,7 @@ public class Settings {
} }
public enum Setting { public enum Setting {
AUTH_SERVER_URL("general.authlib.profile-url", "https://sessionserver.mojang.com/session/minecraft/profile/"),
CHAT_BYSTANDERS_HEAR_TARGETED_CHAT("npc.chat.options.bystanders-hear-targeted-chat", true), CHAT_BYSTANDERS_HEAR_TARGETED_CHAT("npc.chat.options.bystanders-hear-targeted-chat", true),
CHAT_FORMAT("npc.chat.format.no-targets", "[<npc>]: <text>"), CHAT_FORMAT("npc.chat.format.no-targets", "[<npc>]: <text>"),
CHAT_FORMAT_TO_BYSTANDERS("npc.chat.format.with-target-to-bystanders", "[<npc>] -> [<target>]: <text>"), CHAT_FORMAT_TO_BYSTANDERS("npc.chat.format.with-target-to-bystanders", "[<npc>] -> [<target>]: <text>"),

View File

@ -257,8 +257,8 @@ public class NMSImpl implements NMSBridge {
YggdrasilAuthenticationService auth = ((YggdrasilMinecraftSessionService) sessionService) YggdrasilAuthenticationService auth = ((YggdrasilMinecraftSessionService) sessionService)
.getAuthenticationService(); .getAuthenticationService();
URL url = HttpAuthenticationService.constantURL("https://sessionserver.mojang.com/session/minecraft/profile/" URL url = HttpAuthenticationService
+ UUIDTypeAdapter.fromUUID(profile.getId())); .constantURL(Setting.AUTH_SERVER_URL.asString() + UUIDTypeAdapter.fromUUID(profile.getId()));
url = HttpAuthenticationService.concatenateURL(url, "unsigned=" + !requireSecure); url = HttpAuthenticationService.concatenateURL(url, "unsigned=" + !requireSecure);