public class PlayerProfileCache
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.text.SimpleDateFormat |
DATE_FORMAT |
protected Gson |
gson |
Constructor and Description |
---|
PlayerProfileCache(GameProfileRepository profileRepoIn,
java.io.File usercacheFileIn) |
Modifier and Type | Method and Description |
---|---|
void |
addEntry(GameProfile gameProfile)
Add an entry to this cache
|
GameProfile |
getGameProfileForUsername(java.lang.String username)
Get a player's GameProfile given their username.
|
GameProfile |
getProfileByUUID(java.util.UUID uuid)
Get a player's
GameProfile given their UUID |
java.lang.String[] |
getUsernames()
Get an array of the usernames that are cached in this cache
|
void |
load()
Load the cached profiles from disk
|
void |
save()
Save the cached profiles to disk
|
static void |
setOnlineMode(boolean onlineModeIn) |
public static final java.text.SimpleDateFormat DATE_FORMAT
protected final Gson gson
public PlayerProfileCache(GameProfileRepository profileRepoIn, java.io.File usercacheFileIn)
public static void setOnlineMode(boolean onlineModeIn)
public void addEntry(GameProfile gameProfile)
public GameProfile getGameProfileForUsername(java.lang.String username)
public java.lang.String[] getUsernames()
public GameProfile getProfileByUUID(java.util.UUID uuid)
GameProfile
given their UUIDpublic void load()
public void save()