接口 ProfileService


public interface ProfileService
Provides game profile apis.
  • 方法详细资料

    • getGameProfile

      PropertiesGameProfile getGameProfile(UUID profileUUID) throws org.to2mbn.jmccc.auth.AuthenticationException
      Returns the specified player's profile, or null if the player doesn't exist.

      For Mojang implementation: This method has a strict rate limit: You can request the same profile once per minute, however, you can send as many unique requests as you like. So you'd better cache the profiles.

      参数:
      profileUUID - the player's uuid
      返回:
      the specified player's profile, null if the player doesn't exist
      抛出:
      org.to2mbn.jmccc.auth.AuthenticationException - if an exception occurs during requesting
    • fillProperties

      PropertiesGameProfile fillProperties(GameProfile profile) throws org.to2mbn.jmccc.auth.AuthenticationException
      Fetches the properties of the profile and returns it as a PropertiesGameProfile. If the profile is already a PropertiesGameProfile, nothing will be done.

      This method has a rate limit, see getGameProfile(UUID).

      参数:
      profile - the profile
      返回:
      the profile with properties
      抛出:
      org.to2mbn.jmccc.auth.AuthenticationException - if an exception occurs during requesting
    • getTextures

      Map<TextureType,Texture> getTextures(PropertiesGameProfile profile) throws org.to2mbn.jmccc.auth.AuthenticationException
      Returns the specified player's textures.
      参数:
      profile - the player's profile
      返回:
      the player's textures, can be null
      抛出:
      org.to2mbn.jmccc.auth.AuthenticationException - if an exception occurs during requesting
    • lookupGameProfile

      GameProfile lookupGameProfile(String name) throws org.to2mbn.jmccc.auth.AuthenticationException
      Returns the profile of the player that uses the specified username, or null if no such a player exists.
      参数:
      name - the player's name
      返回:
      the profile of the player that uses the specified username, or null if no such a player exists
      抛出:
      org.to2mbn.jmccc.auth.AuthenticationException - if an exception occurs during requesting
    • lookupGameProfile

      GameProfile lookupGameProfile(String name, long timestamp) throws org.to2mbn.jmccc.auth.AuthenticationException
      Returns the profile of the player that uses the specified username at the timestamp provided, or null if no such a player exists.
      参数:
      name - the player's name
      timestamp - the timestamp (java timestamp)
      返回:
      the profile of the player that uses the specified username at the timestamp provided, or null if no such a player exists
      抛出:
      org.to2mbn.jmccc.auth.AuthenticationException - if an exception occurs during requesting
    • lookupGameProfiles

      void lookupGameProfiles(Set<String> names, GameProfileCallback callback)
      Queries the profiles of the given players. The method will block until all the profiles are queried. Once a profile is queried, callback will be called.
      参数:
      names - the players' names
      callback - the callback