Newer
Older
KeeperJerry_Launcher / Launcher / source-authlib / yggdrasil / YggdrasilAuthenticationService.java
@Roman Roman on 28 Nov 2018 1 KB Compability with PaperMC
package com.mojang.authlib.yggdrasil;

import java.net.Proxy;

import com.mojang.authlib.Agent;
import com.mojang.authlib.AuthenticationService;
import com.mojang.authlib.GameProfileRepository;
import com.mojang.authlib.UserAuthentication;
import com.mojang.authlib.minecraft.MinecraftSessionService;
import launcher.helper.LogHelper;

public class YggdrasilAuthenticationService implements AuthenticationService {
    @SuppressWarnings("UnusedParameters")
    public YggdrasilAuthenticationService(Proxy proxy, String clientToken) {
        LogHelper.debug("Patched AuthenticationService created: '%s'", clientToken);
    }

    @Override
    public MinecraftSessionService createMinecraftSessionService() {
        return new YggdrasilMinecraftSessionService(this);
    }

    @Override
    public GameProfileRepository createProfileRepository() {
        return new YggdrasilGameProfileRepository();
    }

    @Override
    public UserAuthentication createUserAuthentication(Agent agent) {
        throw new UnsupportedOperationException("createUserAuthentication is used only by Mojang Launcher");
    }
}