com.github.steveice10.mc.auth.data.GameProfile Java Examples

The following examples show how to use com.github.steveice10.mc.auth.data.GameProfile. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GeyserSession.java    From Geyser with MIT License 6 votes vote down vote up
public GeyserSession(GeyserConnector connector, BedrockServerSession bedrockServerSession) {
    this.connector = connector;
    this.upstream = new UpstreamSession(bedrockServerSession);

    this.chunkCache = new ChunkCache(this);
    this.entityCache = new EntityCache(this);
    this.inventoryCache = new InventoryCache(this);
    this.scoreboardCache = new ScoreboardCache(this);
    this.windowCache = new WindowCache(this);

    this.playerEntity = new PlayerEntity(new GameProfile(UUID.randomUUID(), "unknown"), 1, 1, Vector3f.ZERO, Vector3f.ZERO, Vector3f.ZERO);
    this.inventory = new PlayerInventory();

    this.javaPacketCache = new DataCache<>();

    this.spawned = false;
    this.loggedIn = false;

    this.inventoryCache.getInventories().put(0, inventory);
}
 
Example #2
Source File: SkinUtils.java    From Geyser with MIT License 6 votes vote down vote up
public static PlayerListPacket.Entry buildCachedEntry(GameProfile profile, long geyserId) {
    GameProfileData data = GameProfileData.from(profile);
    SkinProvider.Cape cape = SkinProvider.getCachedCape(data.getCapeUrl());

    SkinProvider.SkinGeometry geometry = SkinProvider.SkinGeometry.getLegacy(data.isAlex());

    return buildEntryManually(
            profile.getId(),
            profile.getName(),
            geyserId,
            profile.getIdAsString(),
            SkinProvider.getCachedSkin(profile.getId()).getSkinData(),
            cape.getCapeId(),
            cape.getCapeData(),
            geometry.getGeometryName(),
            geometry.getGeometryData()
    );
}
 
Example #3
Source File: AuthenticationService.java    From MCAuthLib with MIT License 6 votes vote down vote up
/**
 * Selects a game profile.
 *
 * @param profile Profile to select.
 * @throws RequestException If an error occurs while making the request.
 */
public void selectGameProfile(GameProfile profile) throws RequestException {
    if(!this.loggedIn) {
        throw new RequestException("Cannot change game profile while not logged in.");
    } else if(this.selectedProfile != null) {
        throw new RequestException("Cannot change game profile when it is already selected.");
    } else if(profile == null || !this.profiles.contains(profile)) {
        throw new IllegalArgumentException("Invalid profile '" + profile + "'.");
    }

    RefreshRequest request = new RefreshRequest(this.clientToken, this.accessToken, profile);
    AuthenticateRefreshResponse response = HTTP.makeRequest(this.getProxy(), this.getEndpointUri(REFRESH_ENDPOINT), request, AuthenticateRefreshResponse.class);
    if(response == null) {
        throw new RequestException("Server returned invalid response.");
    } else if(!response.clientToken.equals(this.clientToken)) {
        throw new RequestException("Server responded with incorrect client token.");
    }

    this.accessToken = response.accessToken;
    this.selectedProfile = response.selectedProfile;
}
 
Example #4
Source File: SessionService.java    From MCAuthLib with MIT License 6 votes vote down vote up
/**
 * Fills in the properties of a profile.
 *
 * @param profile Profile to fill in the properties of.
 * @return The given profile, after filling in its properties.
 * @throws ProfileException If the property lookup fails.
 */
public GameProfile fillProfileProperties(GameProfile profile) throws ProfileException {
    if(profile.getId() == null) {
        return profile;
    }

    try {
        MinecraftProfileResponse response = HTTP.makeRequest(this.getProxy(), this.getEndpointUri(PROFILE_ENDPOINT + "/" + UUIDSerializer.fromUUID(profile.getId()), "unsigned=false"), null, MinecraftProfileResponse.class);
        if(response == null) {
            throw new ProfileNotFoundException("Couldn't fetch profile properties for " + profile + " as the profile does not exist.");
        }

        profile.setProperties(response.properties);
        return profile;
    } catch(RequestException e) {
        throw new ProfileLookupException("Couldn't look up profile properties for " + profile + ".", e);
    }
}
 
Example #5
Source File: Profiles.java    From Visage with MIT License 6 votes vote down vote up
public static void writeGameProfile(DataOutputStream data, GameProfile profile) throws IOException {
	if (profile == null) {
		data.writeBoolean(false);
		return;
	}
	data.writeBoolean(true);
	data.writeLong(profile.getId().getMostSignificantBits());
	data.writeLong(profile.getId().getLeastSignificantBits());
	data.writeUTF(profile.getName());
	data.writeShort(profile.getTextures().size());
	for (Map.Entry<TextureType, Texture> en : profile.getTextures().entrySet()) {
		data.writeByte(en.getKey().ordinal());
		data.writeByte(en.getValue().getModel().ordinal());
		data.writeUTF(en.getValue().getURL());
	}
}
 
Example #6
Source File: Profiles.java    From Visage with MIT License 6 votes vote down vote up
public static GameProfile readGameProfile(DataInputStream data) throws IOException {
	boolean present = data.readBoolean();
	if (!present)
		return new GameProfile(new UUID(0, 0), "<unknown>");
	UUID uuid = new UUID(data.readLong(), data.readLong());
	String name = data.readUTF();
	GameProfile profile = new GameProfile(uuid, name);
	int len = data.readUnsignedShort();
	for (int i = 0; i < len; i++) {
		TextureType type = TextureType.values()[data.readUnsignedByte()];
		TextureModel model = TextureModel.values()[data.readUnsignedByte()];
		String url = data.readUTF();
		Map<String, String> m = Maps.newHashMap();
		m.put("model", model.name().toLowerCase(Locale.ROOT));
		profile.getTextures().put(type, new Texture(url, m));
	}
	return profile;
}
 
Example #7
Source File: SessionService.java    From Visage with MIT License 6 votes vote down vote up
/**
 * Fills in the properties of a profile.
 *
 * @param profile Profile to fill in the properties of.
 * @return The given profile, after filling in its properties.
 * @throws ProfileException If the property lookup fails.
 */
public GameProfile fillProfileProperties(GameProfile profile) throws ProfileException {
    if(profile.getId() == null) {
        return profile;
    }

    try {
        MinecraftProfileResponse response = HTTP.makeRequest(this.proxy, BASE_URL+"/profile" + "/" + UUIDSerializer.fromUUID(profile.getId()) + "?unsigned=false", null, MinecraftProfileResponse.class);
        if(response == null) {
            throw new ProfileNotFoundException("Couldn't fetch profile properties for " + profile + " as the profile does not exist.");
        }

        if(response.properties != null) {
            profile.getProperties().addAll(response.properties);
        }

        return profile;
    } catch(RequestException e) {
        throw new ProfileLookupException("Couldn't look up profile properties for " + profile + ".", e);
    }
}
 
Example #8
Source File: AuthenticationService.java    From Visage with MIT License 6 votes vote down vote up
/**
 * Selects a game profile.
 *
 * @param profile Profile to select.
 * @throws RequestException If an error occurs while making the request.
 */
public void selectGameProfile(GameProfile profile) throws RequestException {
    if(!this.loggedIn) {
        throw new RequestException("Cannot change game profile while not logged in.");
    } else if(this.selectedProfile != null) {
        throw new RequestException("Cannot change game profile when it is already selected.");
    } else if(profile != null && this.profiles.contains(profile)) {
        RefreshRequest request = new RefreshRequest(this.clientToken, this.accessToken, profile);
        RefreshResponse response = HTTP.makeRequest(this.proxy, REFRESH_URL, request, RefreshResponse.class);
        if(response.clientToken.equals(this.clientToken)) {
            this.accessToken = response.accessToken;
            this.selectedProfile = response.selectedProfile;
        } else {
            throw new RequestException("Server requested we change our client token. Don't know how to handle this!");
        }
    } else {
        throw new IllegalArgumentException("Invalid profile '" + profile + "'.");
    }
}
 
Example #9
Source File: AuthenticationService.java    From Visage with MIT License 5 votes vote down vote up
private void loginWithPassword() throws RequestException {
    if(this.username == null || this.username.isEmpty()) {
        throw new InvalidCredentialsException("Invalid username.");
    } else if(this.password == null || this.password.isEmpty()) {
        throw new InvalidCredentialsException("Invalid password.");
    } else {
        AuthenticationRequest request = new AuthenticationRequest(this.username, this.password, this.clientToken);
        AuthenticationResponse response = HTTP.makeRequest(this.proxy, AUTHENTICATE_URL, request, AuthenticationResponse.class);
        if(response.clientToken.equals(this.clientToken)) {
            if(response.user != null && response.user.id != null) {
                this.id = response.user.id;
            } else {
                this.id = this.username;
            }

            this.loggedIn = true;
            this.accessToken = response.accessToken;
            this.profiles = response.availableProfiles != null ? Arrays.asList(response.availableProfiles) : Collections.<GameProfile>emptyList();
            this.selectedProfile = response.selectedProfile;
            this.properties.clear();
            if(response.user != null && response.user.properties != null) {
                this.properties.addAll(response.user.properties);
            }
        } else {
            throw new RequestException("Server requested we change our client token. Don't know how to handle this!");
        }
    }
}
 
Example #10
Source File: SessionService.java    From MCAuthLib with MIT License 5 votes vote down vote up
/**
 * Gets the profile of the given user if they are currently logged in to the given server.
 *
 * @param name     Name of the user to get the profile of.
 * @param serverId ID of the server to check if they're logged in to.
 * @return The profile of the given user, or null if they are not logged in to the given server.
 * @throws RequestException If an error occurs while making the request.
 */
public GameProfile getProfileByServer(String name, String serverId) throws RequestException {
    HasJoinedResponse response = HTTP.makeRequest(this.getProxy(), this.getEndpointUri(HAS_JOINED_ENDPOINT, "username=" + name + "&serverId=" + serverId), null, HasJoinedResponse.class);
    if(response != null && response.id != null) {
        GameProfile result = new GameProfile(response.id, name);
        result.setProperties(response.properties);
        return result;
    } else {
        return null;
    }
}
 
Example #11
Source File: Profiles.java    From Visage with MIT License 5 votes vote down vote up
public static boolean isSlim(GameProfile profile) throws IOException {
	if (profile.getTextures().containsKey(TextureType.SKIN)) {
		Texture t = profile.getTexture(TextureType.SKIN);
		return t.getModel() == TextureModel.SLIM;
	}
	return UUIDs.isAlex(profile.getId());
}
 
Example #12
Source File: RenderContext.java    From Visage with MIT License 5 votes vote down vote up
private void processDelivery(Delivery delivery) throws Exception {
	BasicProperties props = delivery.getProperties();
	BasicProperties replyProps = new BasicProperties.Builder().correlationId(props.getCorrelationId()).build();
	DataInputStream data = new DataInputStream(new InflaterInputStream(new ByteArrayInputStream(delivery.getBody())));
	RenderMode mode = RenderMode.values()[data.readUnsignedByte()];
	int width = data.readUnsignedShort();
	int height = data.readUnsignedShort();
	GameProfile profile = Profiles.readGameProfile(data);
	Map<String, String[]> params = Maps.newHashMap();
	int len = data.readUnsignedShort();
	for (int i = 0; i < len; i++) {
		String key = data.readUTF();
		String[] val = new String[data.readUnsignedByte()];
		for (int v = 0; v < val.length; v++) {
			val[v] = data.readUTF();
		}
		params.put(key, val);
	}
	byte[] skinData = new byte[data.readInt()];
	data.readFully(skinData);
	BufferedImage skin = new PngImage().read(new ByteArrayInputStream(skinData), false);
	Visage.log.info("Received a job to render a "+width+"x"+height+" "+mode.name().toLowerCase()+" for "+(profile == null ? "null" : profile.getName()));
	
	RenderConfiguration conf = new RenderConfiguration(Type.fromMode(mode), Profiles.isSlim(profile), mode.isTall(), Profiles.isFlipped(profile));
	
	glClearColor(0, 0, 0, 0);
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	byte[] pngBys = draw(conf, width, height, profile, skin, params);
	if (Visage.trace) Visage.log.finest("Got png bytes");
	parent.channel.basicPublish("", props.getReplyTo(), replyProps, buildResponse(0, pngBys));
	if (Visage.trace) Visage.log.finest("Published response");
	parent.channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
	if (Visage.trace) Visage.log.finest("Ack'd message");
}
 
Example #13
Source File: AuthenticationService.java    From Visage with MIT License 5 votes vote down vote up
private void loginWithToken() throws RequestException {
    if(this.id == null || this.id.isEmpty()) {
        if(this.username == null || this.username.isEmpty()) {
            throw new InvalidCredentialsException("Invalid uuid and username.");
        }

        this.id = this.username;
    }

    if(this.accessToken == null || this.accessToken.equals("")) {
        throw new InvalidCredentialsException("Invalid access token.");
    } else {
        RefreshRequest request = new RefreshRequest(this.clientToken, this.accessToken, null);
        RefreshResponse response = HTTP.makeRequest(this.proxy, REFRESH_URL, request, RefreshResponse.class);
        if(response.clientToken.equals(this.clientToken)) {
            if(response.user != null && response.user.id != null) {
                this.id = response.user.id;
            } else {
                this.id = this.username;
            }

            this.loggedIn = true;
            this.accessToken = response.accessToken;
            this.profiles = response.availableProfiles != null ? Arrays.asList(response.availableProfiles) : Collections.<GameProfile>emptyList();
            this.selectedProfile = response.selectedProfile;
            this.properties.clear();
            if(response.user != null && response.user.properties != null) {
                this.properties.addAll(response.user.properties);
            }
        } else {
            throw new RequestException("Server requested we change our client token. Don't know how to handle this!");
        }
    }
}
 
Example #14
Source File: PlayerEntity.java    From Geyser with MIT License 5 votes vote down vote up
public PlayerEntity(GameProfile gameProfile, long entityId, long geyserId, Vector3f position, Vector3f motion, Vector3f rotation) {
    super(entityId, geyserId, EntityType.PLAYER, position, motion, rotation);

    profile = gameProfile;
    uuid = gameProfile.getId();
    username = gameProfile.getName();
    effectCache = new EntityEffectCache();
    if (geyserId == 1) valid = true;
}
 
Example #15
Source File: SkinUtils.java    From Geyser with MIT License 5 votes vote down vote up
public static PlayerListPacket.Entry buildDefaultEntry(GameProfile profile, long geyserId) {
    return buildEntryManually(
            profile.getId(),
            profile.getName(),
            geyserId,
            profile.getIdAsString(),
            SkinProvider.STEVE_SKIN,
            SkinProvider.EMPTY_CAPE.getCapeId(),
            SkinProvider.EMPTY_CAPE.getCapeData(),
            SkinProvider.EMPTY_GEOMETRY.getGeometryName(),
            SkinProvider.EMPTY_GEOMETRY.getGeometryData()
    );
}
 
Example #16
Source File: SkinUtils.java    From Geyser with MIT License 5 votes vote down vote up
/**
 * Generate the GameProfileData from the given GameProfile
 *
 * @param profile GameProfile to build the GameProfileData from
 * @return The built GameProfileData
 */
public static GameProfileData from(GameProfile profile) {
    // Fallback to the offline mode of working it out
    boolean isAlex = ((profile.getId().hashCode() % 2) == 1);

    try {
        GameProfile.Property skinProperty = profile.getProperty("textures");

        JsonNode skinObject = new ObjectMapper().readTree(new String(Base64.getDecoder().decode(skinProperty.getValue()), StandardCharsets.UTF_8));
        JsonNode textures = skinObject.get("textures");

        JsonNode skinTexture = textures.get("SKIN");
        String skinUrl = skinTexture.get("url").asText();

        isAlex = skinTexture.has("metadata");

        String capeUrl = null;
        if (textures.has("CAPE")) {
            JsonNode capeTexture = textures.get("CAPE");
            capeUrl = capeTexture.get("url").asText();
        }

        return new GameProfileData(skinUrl, capeUrl, isAlex);
    } catch (Exception exception) {
        if (GeyserConnector.getInstance().getAuthType() != AuthType.OFFLINE) {
            GeyserConnector.getInstance().getLogger().debug("Got invalid texture data for " + profile.getName() + " " + exception.getMessage());
        }
        // return default skin with default cape when texture data is invalid
        return new GameProfileData((isAlex ? SkinProvider.EMPTY_SKIN_ALEX.getTextureUrl() : SkinProvider.EMPTY_SKIN.getTextureUrl()), SkinProvider.EMPTY_CAPE.getTextureUrl(), isAlex);
    }
}
 
Example #17
Source File: SessionService.java    From Visage with MIT License 5 votes vote down vote up
/**
 * Gets the profile of the given user if they are currently logged in to the given server.
 *
 * @param name     Name of the user to get the profile of.
 * @param serverId ID of the server to check if they're logged in to.
 * @return The profile of the given user, or null if they are not logged in to the given server.
 * @throws RequestException If an error occurs while making the request.
 */
public GameProfile getProfileByServer(String name, String serverId) throws RequestException {
    HasJoinedResponse response = HTTP.makeRequest(this.proxy, BASE_URL+"/hasJoined" + "?username=" + name + "&serverId=" + serverId, null, HasJoinedResponse.class);
    if(response != null && response.id != null) {
        GameProfile result = new GameProfile(response.id, name);
        if(response.properties != null) {
            result.getProperties().addAll(response.properties);
        }

        return result;
    } else {
        return null;
    }
}
 
Example #18
Source File: ProtocolWrapper.java    From LambdaAttack with MIT License 4 votes vote down vote up
public ProtocolWrapper(GameProfile profile, String accessToken) {
    super(profile, accessToken);
}
 
Example #19
Source File: AuthenticationService.java    From MCAuthLib with MIT License 4 votes vote down vote up
protected RefreshRequest(String clientToken, String accessToken, GameProfile selectedProfile) {
    this.clientToken = clientToken;
    this.accessToken = accessToken;
    this.selectedProfile = selectedProfile;
    this.requestUser = true;
}
 
Example #20
Source File: ProtocolWrapper.java    From LambdaAttack with MIT License 4 votes vote down vote up
public ProtocolWrapper(GameProfile profile, String accessToken) {
    super(profile, accessToken);
}
 
Example #21
Source File: Profiles.java    From Visage with MIT License 4 votes vote down vote up
public static boolean isFlipped(GameProfile profile) {
	return "Dinnerbone".equals(profile.getName()) ||
			"Grumm".equals(profile.getName());
}
 
Example #22
Source File: Bot.java    From LambdaAttack with MIT License 4 votes vote down vote up
public GameProfile getGameProfile() {
    return account.getProfile();
}
 
Example #23
Source File: VisageDistributor.java    From Visage with MIT License 4 votes vote down vote up
public RenderResponse renderRpc(RenderMode mode, int width, int height, GameProfile profile, byte[] skin, Map<String, String[]> switches) throws RenderFailedException, NoRenderersAvailableException {
	if (mode == RenderMode.SKIN) return null;
	try {
		byte[] response = null;
		String corrId = UUID.randomUUID().toString();
		BasicProperties props = new BasicProperties.Builder().correlationId(corrId).replyTo(replyQueue).build();
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		DeflaterOutputStream defos = new DeflaterOutputStream(baos);
		DataOutputStream dos = new DataOutputStream(defos);
		dos.writeByte(mode.ordinal());
		dos.writeShort(width);
		dos.writeShort(height);
		Profiles.writeGameProfile(dos, profile);
		dos.writeShort(switches.size());
		for (Entry<String, String[]> en : switches.entrySet()) {
			dos.writeUTF(en.getKey());
			dos.writeByte(en.getValue().length);
			for (String s : en.getValue()) {
				dos.writeUTF(s);
			}
		}
		dos.writeInt(skin.length);
		dos.write(skin);
		dos.flush();
		defos.finish();
		channel.basicPublish("", config.getString("rabbitmq.queue"), props, baos.toByteArray());
		if (Visage.debug) Visage.log.finer("Requested a "+width+"x"+height+" "+mode.name().toLowerCase()+" render for "+(profile == null ? "null" : profile.getName()));
		final Object waiter = new Object();
		queuedJobs.put(corrId, new Runnable() {
			@Override
			public void run() {
				if (Visage.debug) Visage.log.finer("Got response");
				synchronized (waiter) {
					waiter.notify();
				}
			}
		});
		long start = System.currentTimeMillis();
		long timeout = config.getDuration("render.timeout", TimeUnit.MILLISECONDS);
		synchronized (waiter) {
			while (queuedJobs.containsKey(corrId) && (System.currentTimeMillis()-start) < timeout) {
				if (Visage.trace) Visage.log.finest("Waiting...");
				waiter.wait(timeout);
			}
		}
		if (queuedJobs.containsKey(corrId)) {
			if (Visage.trace) Visage.log.finest("Queue still contains this request, assuming timeout");
			queuedJobs.remove(corrId);
			throw new RenderFailedException("Request timed out");
		}
		response = responses.get(corrId);
		responses.remove(corrId);
		if (response == null)
			throw new RenderFailedException("Response was null");
		ByteArrayInputStream bais = new ByteArrayInputStream(response);
		String renderer = new DataInputStream(bais).readUTF();
		int type = bais.read();
		byte[] payload = ByteStreams.toByteArray(bais);
		if (type == 0) {
			if (Visage.trace) Visage.log.finest("Got type 0, success");
			RenderResponse resp = new RenderResponse();
			resp.renderer = renderer;
			resp.png = payload;
			Visage.log.info("Receieved a "+mode.name().toLowerCase()+" render from "+resp.renderer);
			return resp;
		} else if (type == 1) {
			if (Visage.trace) Visage.log.finest("Got type 1, failure");
			ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(payload));
			Throwable t = (Throwable)ois.readObject();
			throw new RenderFailedException("Renderer reported error", t);
		} else
			throw new RenderFailedException("Malformed response from '"+renderer+"' - unknown response id "+type);
	} catch (Exception e) {
		if (e instanceof RenderFailedException)
			throw (RenderFailedException) e;
		throw new RenderFailedException("Unexpected error", e);
	}
}
 
Example #24
Source File: AuthenticationService.java    From Visage with MIT License 4 votes vote down vote up
protected RefreshRequest(String clientToken, String accessToken, GameProfile selectedProfile) {
    this.clientToken = clientToken;
    this.accessToken = accessToken;
    this.selectedProfile = selectedProfile;
    this.requestUser = true;
}
 
Example #25
Source File: SessionService.java    From Visage with MIT License 2 votes vote down vote up
/**
 * Joins a server.
 *
 * @param profile             Profile to join the server with.
 * @param authenticationToken Authentication token to join the server with.
 * @param serverId            ID of the server to join.
 * @throws RequestException If an error occurs while making the request.
 */
public void joinServer(GameProfile profile, String authenticationToken, String serverId) throws RequestException {
    JoinServerRequest request = new JoinServerRequest(authenticationToken, profile.getId(), serverId);
    HTTP.makeRequest(this.proxy, BASE_URL+"/join", request, null);
}
 
Example #26
Source File: AuthenticationService.java    From Visage with MIT License 2 votes vote down vote up
/**
 * Gets the properties of the user logged in with the service.
 *
 * @return The user's properties.
 */
public List<GameProfile.Property> getProperties() {
    return this.isLoggedIn() ? new ArrayList<GameProfile.Property>(this.properties) : Collections.<GameProfile.Property>emptyList();
}
 
Example #27
Source File: SessionService.java    From MCAuthLib with MIT License 2 votes vote down vote up
/**
 * Joins a server.
 *
 * @param profile             Profile to join the server with.
 * @param authenticationToken Authentication token to join the server with.
 * @param serverId            ID of the server to join.
 * @throws RequestException If an error occurs while making the request.
 */
public void joinServer(GameProfile profile, String authenticationToken, String serverId) throws RequestException {
    JoinServerRequest request = new JoinServerRequest(authenticationToken, profile.getId(), serverId);
    HTTP.makeRequest(this.getProxy(), this.getEndpointUri(JOIN_ENDPOINT), request, null);
}
 
Example #28
Source File: ProfileService.java    From Visage with MIT License 2 votes vote down vote up
/**
 * Called when a profile lookup request succeeds.
 *
 * @param profile Profile resulting from the request.
 */
public void onProfileLookupSucceeded(GameProfile profile);
 
Example #29
Source File: ProfileService.java    From Visage with MIT License 2 votes vote down vote up
/**
 * Called when a profile lookup request fails.
 *
 * @param profile Profile that failed to be located.
 * @param e       Exception causing the failure.
 */
public void onProfileLookupFailed(GameProfile profile, Exception e);
 
Example #30
Source File: ProfileService.java    From MCAuthLib with MIT License 2 votes vote down vote up
/**
 * Called when a profile lookup request succeeds.
 *
 * @param profile Profile resulting from the request.
 */
public void onProfileLookupSucceeded(GameProfile profile);