Package net.minecraft.server.management
Class PlayerProfileCache
- java.lang.Object
-
- net.minecraft.server.management.PlayerProfileCache
-
public class PlayerProfileCache extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PlayerProfileCache.ProfileEntry
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
file
private com.google.gson.Gson
gson
private static org.apache.logging.log4j.Logger
LOGGER
private java.util.concurrent.atomic.AtomicLong
operationCount
private com.mojang.authlib.GameProfileRepository
profileRepository
private java.util.Map<java.lang.String,PlayerProfileCache.ProfileEntry>
profilesByName
private java.util.Map<java.util.UUID,PlayerProfileCache.ProfileEntry>
profilesByUUID
private static boolean
usesAuthentication
-
Constructor Summary
Constructors Constructor Description PlayerProfileCache(com.mojang.authlib.GameProfileRepository p_i46836_1_, java.io.File p_i46836_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(com.mojang.authlib.GameProfile p_152649_1_)
private static java.text.DateFormat
createDateFormat()
com.mojang.authlib.GameProfile
get(java.lang.String p_152655_1_)
com.mojang.authlib.GameProfile
get(java.util.UUID p_152652_1_)
private long
getNextOperation()
private java.util.stream.Stream<PlayerProfileCache.ProfileEntry>
getTopMRUProfiles(int p_242117_1_)
java.util.List<PlayerProfileCache.ProfileEntry>
load()
private static com.mojang.authlib.GameProfile
lookupGameProfile(com.mojang.authlib.GameProfileRepository p_187319_0_, java.lang.String p_187319_1_)
private static PlayerProfileCache.ProfileEntry
readGameProfile(com.google.gson.JsonElement p_242121_0_, java.text.DateFormat p_242121_1_)
private void
safeAdd(PlayerProfileCache.ProfileEntry p_242118_1_)
void
save()
static void
setUsesAuthentication(boolean p_187320_0_)
private static boolean
usesAuthentication()
private static com.google.gson.JsonElement
writeGameProfile(PlayerProfileCache.ProfileEntry p_242119_0_, java.text.DateFormat p_242119_1_)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
usesAuthentication
private static boolean usesAuthentication
-
profilesByName
private final java.util.Map<java.lang.String,PlayerProfileCache.ProfileEntry> profilesByName
-
profilesByUUID
private final java.util.Map<java.util.UUID,PlayerProfileCache.ProfileEntry> profilesByUUID
-
profileRepository
private final com.mojang.authlib.GameProfileRepository profileRepository
-
gson
private final com.google.gson.Gson gson
-
file
private final java.io.File file
-
operationCount
private final java.util.concurrent.atomic.AtomicLong operationCount
-
-
Method Detail
-
safeAdd
private void safeAdd(PlayerProfileCache.ProfileEntry p_242118_1_)
-
lookupGameProfile
@Nullable private static com.mojang.authlib.GameProfile lookupGameProfile(com.mojang.authlib.GameProfileRepository p_187319_0_, java.lang.String p_187319_1_)
-
setUsesAuthentication
public static void setUsesAuthentication(boolean p_187320_0_)
-
usesAuthentication
private static boolean usesAuthentication()
-
add
public void add(com.mojang.authlib.GameProfile p_152649_1_)
-
getNextOperation
private long getNextOperation()
-
get
@Nullable public com.mojang.authlib.GameProfile get(java.lang.String p_152655_1_)
-
get
@Nullable public com.mojang.authlib.GameProfile get(java.util.UUID p_152652_1_)
-
createDateFormat
private static java.text.DateFormat createDateFormat()
-
load
public java.util.List<PlayerProfileCache.ProfileEntry> load()
-
save
public void save()
-
getTopMRUProfiles
private java.util.stream.Stream<PlayerProfileCache.ProfileEntry> getTopMRUProfiles(int p_242117_1_)
-
writeGameProfile
private static com.google.gson.JsonElement writeGameProfile(PlayerProfileCache.ProfileEntry p_242119_0_, java.text.DateFormat p_242119_1_)
-
readGameProfile
@Nullable private static PlayerProfileCache.ProfileEntry readGameProfile(com.google.gson.JsonElement p_242121_0_, java.text.DateFormat p_242121_1_)
-
-