Package de.saibotk.jmaw
Class PlayerProfile
java.lang.Object
de.saibotk.jmaw.PlayerProfile
This models the response for the Mojang API when querying for information on a specific player via
MojangAPI.getPlayerProfile(String)
.- Since:
- 1.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
Returns the players uuid.Returns a list of properties of the player.getProperty
(String name) This will find the specific property in the PlayerProfile.This will return the textures property, if available.Returns the current username for the player.boolean
isLegacy()
Returns if an account is a legacy account.void
setLegacy
(boolean legacy) Set if an account is a legacy account.
-
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
Returns the players uuid.- Returns:
- the uuid.
- Since:
- 1.0
-
getUsername
Returns the current username for the player.- Returns:
- the username.
- Since:
- 1.0
-
getProperties
Returns a list of properties of the player. These are instances of thePlayerProperty
class.- Returns:
- a list of player properties.
- Since:
- 1.0
-
getProperty
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
This will return the textures property, if available.- Returns:
- the textures property (wrapped as
Optional
). - Since:
- 1.0
-