类 GameProfileCache

java.lang.Object
net.minecraft.server.players.GameProfileCache

public class GameProfileCache extends Object
  • 字段详细资料

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • GAMEPROFILES_MRU_LIMIT

      private static final int GAMEPROFILES_MRU_LIMIT
      另请参阅:
    • GAMEPROFILES_EXPIRATION_MONTHS

      private static final int GAMEPROFILES_EXPIRATION_MONTHS
      另请参阅:
    • usesAuthentication

      private static boolean usesAuthentication
    • profilesByName

      private final Map<String,GameProfileCache.GameProfileInfo> profilesByName
    • profilesByUUID

      private final Map<UUID,GameProfileCache.GameProfileInfo> profilesByUUID
    • requests

      private final Map<String,CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> requests
    • profileRepository

      private final com.mojang.authlib.GameProfileRepository profileRepository
    • gson

      private final com.google.gson.Gson gson
    • file

      private final File file
    • operationCount

      private final AtomicLong operationCount
    • executor

      @Nullable private Executor executor
  • 构造器详细资料

    • GameProfileCache

      public GameProfileCache(com.mojang.authlib.GameProfileRepository pProfileRepository, File pFile)
  • 方法详细资料

    • safeAdd

      private void safeAdd(GameProfileCache.GameProfileInfo p_10980_)
    • lookupGameProfile

      private static Optional<com.mojang.authlib.GameProfile> lookupGameProfile(com.mojang.authlib.GameProfileRepository pProfileRepo, String pName)
    • setUsesAuthentication

      public static void setUsesAuthentication(boolean pOnlineMode)
    • usesAuthentication

      private static boolean usesAuthentication()
    • add

      public void add(com.mojang.authlib.GameProfile pGameProfile)
    • getNextOperation

      private long getNextOperation()
    • get

      public Optional<com.mojang.authlib.GameProfile> get(String pName)
    • getAsync

      public void getAsync(String p_143968_, Consumer<Optional<com.mojang.authlib.GameProfile>> p_143969_)
    • get

      public Optional<com.mojang.authlib.GameProfile> get(UUID pUuid)
    • setExecutor

      public void setExecutor(Executor pExectutor)
    • clearExecutor

      public void clearExecutor()
    • createDateFormat

      private static DateFormat createDateFormat()
    • load

    • save

      public void save()
    • getTopMRUProfiles

      private Stream<GameProfileCache.GameProfileInfo> getTopMRUProfiles(int pLimit)
    • writeGameProfile

      private static com.google.gson.JsonElement writeGameProfile(GameProfileCache.GameProfileInfo pProfileInfo, DateFormat pDateFormat)
    • readGameProfile

      private static Optional<GameProfileCache.GameProfileInfo> readGameProfile(com.google.gson.JsonElement pJson, DateFormat pDateFormat)