public class PlayerProfileCache
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.text.SimpleDateFormat |
dateFormat |
protected Gson |
gson |
Constructor and Description |
---|
PlayerProfileCache(MinecraftServer server,
java.io.File cacheFile) |
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
|
public static final java.text.SimpleDateFormat dateFormat
protected final Gson gson
public PlayerProfileCache(MinecraftServer server, java.io.File cacheFile)
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()