Class PlayerProfile

java.lang.Object
de.saibotk.jmaw.PlayerProfile

public class PlayerProfile extends Object
This models the response for the Mojang API when querying for information on a specific player via MojangAPI.getPlayerProfile(String).
Since:
1.0
  • Constructor Details

    • PlayerProfile

      public PlayerProfile()
  • Method Details

    • isLegacy

      public boolean isLegacy()
      Returns if an account is a legacy account.
      Returns:
      true if it is and false if not.
      Since:
      1.0
    • setLegacy

      public void setLegacy(boolean legacy)
      Set if an account is a legacy account. This will not modify anything on the Mojang account / API.
      Parameters:
      legacy - whether or not the account is a legacy account.
      Since:
      1.0
    • getId

      public String getId()
      Returns the players uuid.
      Returns:
      the uuid.
      Since:
      1.0
    • getUsername

      public String getUsername()
      Returns the current username for the player.
      Returns:
      the username.
      Since:
      1.0
    • getProperties

      public List<PlayerProperty> getProperties()
      Returns a list of properties of the player. These are instances of the PlayerProperty class.
      Returns:
      a list of player properties.
      Since:
      1.0
    • getProperty

      public Optional<PlayerProperty> getProperty(String name)
      This will find the specific property in the PlayerProfile.
      Parameters:
      name - the name of the property.
      Returns:
      the property (wrapped as Optional).
      Since:
      1.0
    • getTexturesProperty

      public Optional<PlayerTexturesProperty> getTexturesProperty()
      This will return the textures property, if available.
      Returns:
      the textures property (wrapped as Optional).
      Since:
      1.0