public class GameProfile extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GameProfile.Property
A property belonging to a profile.
|
static class |
GameProfile.Texture
A texture contained within a profile.
|
static class |
GameProfile.TextureModel
The model used for a profile texture.
|
static class |
GameProfile.TextureType
The type of a profile texture.
|
| Constructor and Description |
|---|
GameProfile(String id,
String name)
Creates a new GameProfile instance.
|
GameProfile(UUID id,
String name)
Creates a new GameProfile instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
UUID |
getId()
Gets the ID of the profile.
|
String |
getIdAsString()
Gets the ID of the profile as a String.
|
String |
getName()
Gets the name of the profile.
|
List<GameProfile.Property> |
getProperties()
Gets an immutable list of properties contained in the profile.
|
GameProfile.Property |
getProperty(String name)
Gets a property contained in the profile.
|
GameProfile.Texture |
getTexture(GameProfile.TextureType type)
Gets a texture contained in the profile.
|
GameProfile.Texture |
getTexture(GameProfile.TextureType type,
boolean requireSecure)
Gets a texture contained in the profile.
|
Map<GameProfile.TextureType,GameProfile.Texture> |
getTextures()
Gets an immutable map of texture types to textures contained in the profile.
|
Map<GameProfile.TextureType,GameProfile.Texture> |
getTextures(boolean requireSecure)
Gets an immutable map of texture types to textures contained in the profile.
|
int |
hashCode() |
boolean |
isComplete()
Gets whether the profile is complete.
|
void |
setProperties(List<GameProfile.Property> properties)
Sets the properties of this profile.
|
String |
toString() |
public GameProfile(String id, String name)
id - ID of the profile.name - Name of the profile.public boolean isComplete()
public UUID getId()
public String getIdAsString()
public String getName()
public List<GameProfile.Property> getProperties()
public void setProperties(List<GameProfile.Property> properties)
properties - Properties belonging to this profile.public GameProfile.Property getProperty(String name)
name - Name of the property.public Map<GameProfile.TextureType,GameProfile.Texture> getTextures() throws PropertyException
PropertyException - If an error occurs decoding the profile's texture property.public Map<GameProfile.TextureType,GameProfile.Texture> getTextures(boolean requireSecure) throws PropertyException
requireSecure - Whether to require the profile's texture payload to be securely signed.PropertyException - If an error occurs decoding the profile's texture property.public GameProfile.Texture getTexture(GameProfile.TextureType type) throws PropertyException
type - Type of texture to get.PropertyException - If an error occurs decoding the profile's texture property.public GameProfile.Texture getTexture(GameProfile.TextureType type, boolean requireSecure) throws PropertyException
type - Type of texture to get.requireSecure - Whether to require the profile's texture payload to be securely signed.PropertyException - If an error occurs decoding the profile's texture property.Copyright © 2023. All rights reserved.