Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fr.lightskraft.parasium.launcher;
- import java.io.File;
- import fr.theshark34.openauth.AuthPoints;
- import fr.theshark34.openauth.AuthenticationException;
- import fr.theshark34.openauth.Authenticator;
- import fr.theshark34.openauth.model.AuthAgent;
- import fr.theshark34.openauth.model.response.AuthResponse;
- import fr.theshark34.openlauncherlib.launcher.AuthInfos;
- import fr.theshark34.openlauncherlib.launcher.GameInfos;
- import fr.theshark34.openlauncherlib.launcher.GameTweak;
- import fr.theshark34.openlauncherlib.launcher.GameType;
- import fr.theshark34.openlauncherlib.launcher.GameVersion;
- public class Launcher {
- public static final GameVersion PA_VERSION = new GameVersion("1.12.2", GameType.V1_8_HIGHER);
- public static final GameInfos PA_INFOS = new GameInfos("Parasium", PA_VERSION, true, new GameTweak[] {GameTweak.FORGE});
- public static final File PA_DIR = PA_INFOS.getGameDir();
- private static AuthInfos authInfos;
- public static void auth(String username, String password) throws AuthenticationException {
- Authenticator authenticator = new Authenticator(Authenticator.MOJANG_AUTH_URL, AuthPoints.NORMAL_AUTH_POINTS);
- AuthResponse response = authenticator.authenticate(AuthAgent.MINECRAFT, username, password, "");
- authInfos = new AuthInfos(response.getSelectedProfile().getName(), response.getAccessToken(), response.getSelectedProfile().getId());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement