Newer
Older
KeeperJerry_Launcher / LaunchServer / source / texture / MojangTextureProvider.java
@KeeperJerry KeeperJerry on 28 Oct 2021 1 KB Ну допустим...
package launchserver.texture;

import launcher.client.PlayerProfile.Texture;
import launcher.serialize.config.entry.BlockConfigEntry;

import java.util.UUID;

public final class MojangTextureProvider extends TextureProvider
{
    public MojangTextureProvider(BlockConfigEntry block)
    {
        super(block);
    }

    protected CacheTextureProvider cacheTextureProvider;

    @Override
    public void close()
    {
        // Do nothing
    }

    @Override
    public synchronized Texture getSkinTexture(UUID uuid, String username)
    {
        return cacheTextureProvider.getCached(uuid, username, "https://api.mojang.com/users/profiles/minecraft/", "https://sessionserver.mojang.com/session/minecraft/profile/", "Mojang").skin;
    }

    @Override
    public synchronized Texture getCloakTexture(UUID uuid, String username)
    {
        return cacheTextureProvider.getCached(uuid, username, "https://api.mojang.com/users/profiles/minecraft/", "https://sessionserver.mojang.com/session/minecraft/profile/", "Mojang").cloak;
    }
}