public class UserCache extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
UserCache.Entry |
Modifier and Type | Field and Description |
---|---|
private Map<String,UserCache.Entry> |
byName |
private Map<UUID,UserCache.Entry> |
byUuid |
private File |
cacheFile |
private AtomicLong |
field_25724 |
private static Logger |
field_25805 |
private Gson |
gson |
private com.mojang.authlib.GameProfileRepository |
profileRepository |
private static boolean |
useRemote |
Constructor and Description |
---|
UserCache(com.mojang.authlib.GameProfileRepository profileRepository,
File cacheFile) |
Modifier and Type | Method and Description |
---|---|
void |
add(com.mojang.authlib.GameProfile gameProfile) |
com.mojang.authlib.GameProfile |
findByName(String string) |
private static com.mojang.authlib.GameProfile |
findProfileByName(com.mojang.authlib.GameProfileRepository repository,
String name) |
com.mojang.authlib.GameProfile |
getByUuid(UUID uUID) |
private Stream<UserCache.Entry> |
getLastAccessedEntries(int int2) |
List<UserCache.Entry> |
load() |
private void |
method_30164(UserCache.Entry entry) |
private static JsonElement |
method_30165(UserCache.Entry entry,
DateFormat dateFormat) |
private static UserCache.Entry |
method_30167(JsonElement jsonElement,
DateFormat dateFormat) |
private long |
method_30169() |
private static DateFormat |
method_30170() |
void |
save() |
static void |
setUseRemote(boolean value) |
private static boolean |
shouldUseRemote() |
private static final Logger field_25805
private static boolean useRemote
private final Map<String,UserCache.Entry> byName
private final Map<UUID,UserCache.Entry> byUuid
private final com.mojang.authlib.GameProfileRepository profileRepository
private final Gson gson
private final File cacheFile
private final AtomicLong field_25724
public UserCache(com.mojang.authlib.GameProfileRepository profileRepository, File cacheFile)
private void method_30164(UserCache.Entry entry)
@Nullable private static com.mojang.authlib.GameProfile findProfileByName(com.mojang.authlib.GameProfileRepository repository, String name)
public static void setUseRemote(boolean value)
private static boolean shouldUseRemote()
public void add(com.mojang.authlib.GameProfile gameProfile)
private long method_30169()
private static DateFormat method_30170()
public List<UserCache.Entry> load()
public void save()
private Stream<UserCache.Entry> getLastAccessedEntries(int int2)
private static JsonElement method_30165(UserCache.Entry entry, DateFormat dateFormat)
@Nullable private static UserCache.Entry method_30167(JsonElement jsonElement, DateFormat dateFormat)