Package net.skinsrestorer.api.storage
Interface CacheStorage
public interface CacheStorage
Caches Name -> UUID to avoid spamming data providers and speed up skin fetching.
This does also cache whether a premium player exists or not.
-
Method Summary
-
Method Details
-
getSkin
@Deprecated Optional<MojangSkinDataResult> getSkin(String playerName, boolean allowExpired) throws DataRequestException Deprecated.UseSkinStorage.getPlayerSkin(String, boolean)
instead. This method will now just redirect you toSkinStorage.getPlayerSkin(String, boolean)
. TODO: Remove in 16.0.0Gets the skin data of a Mojang player by name using the UUID cache. This will cache the UUID if it's not already cached and will cache the skin data.- Parameters:
playerName
- Player name to search forallowExpired
- Allow expired data to be returned- Returns:
- The skin data of the player or empty if no such player exists
- Throws:
DataRequestException
- If the data could not be retrieved
-
getUUID
Gets the UUID of a Mojang player from the cache. If the UUID is not found locally, it will try to get the UUID from one of our data providers.- Parameters:
playerName
- Player name to search for- Returns:
- The uuid of the player or empty if no such player exists
- Throws:
DataRequestException
-
SkinStorage.getPlayerSkin(String, boolean)
instead.