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 classPlayerProfileCache.ProfileEntry
-
Field Summary
Fields Modifier and Type Field Description private java.io.Filefileprivate com.google.gson.Gsongsonprivate static org.apache.logging.log4j.LoggerLOGGERprivate java.util.concurrent.atomic.AtomicLongoperationCountprivate com.mojang.authlib.GameProfileRepositoryprofileRepositoryprivate java.util.Map<java.lang.String,PlayerProfileCache.ProfileEntry>profilesByNameprivate java.util.Map<java.util.UUID,PlayerProfileCache.ProfileEntry>profilesByUUIDprivate static booleanusesAuthentication
-
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 voidadd(com.mojang.authlib.GameProfile p_152649_1_)private static java.text.DateFormatcreateDateFormat()com.mojang.authlib.GameProfileget(java.lang.String p_152655_1_)com.mojang.authlib.GameProfileget(java.util.UUID p_152652_1_)private longgetNextOperation()private java.util.stream.Stream<PlayerProfileCache.ProfileEntry>getTopMRUProfiles(int p_242117_1_)java.util.List<PlayerProfileCache.ProfileEntry>load()private static com.mojang.authlib.GameProfilelookupGameProfile(com.mojang.authlib.GameProfileRepository p_187319_0_, java.lang.String p_187319_1_)private static PlayerProfileCache.ProfileEntryreadGameProfile(com.google.gson.JsonElement p_242121_0_, java.text.DateFormat p_242121_1_)private voidsafeAdd(PlayerProfileCache.ProfileEntry p_242118_1_)voidsave()static voidsetUsesAuthentication(boolean p_187320_0_)private static booleanusesAuthentication()private static com.google.gson.JsonElementwriteGameProfile(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_)
-
-