Interface ProfileProperty
-
- All Superinterfaces:
DataSerializable
public interface ProfileProperty extends DataSerializable
Represents a property in aGameProfile
's profile property map.This interface should not be implemented by third parties - use
of(String, String)
orof(String, String, String)
to create instances instead.- See Also:
of(String, String)
,of(String, String, String)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ProfileProperty.Factory
A factory forProfileProperty
s.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TEXTURES
The name of thetextures
property.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
hasSignature()
Tests if this property has a signature.java.lang.String
name()
Gets the name of this property.static ProfileProperty
of(java.lang.String name, java.lang.String value)
Creates a new property.static ProfileProperty
of(java.lang.String name, java.lang.String value, @Nullable java.lang.String signature)
Creates a new signed property.java.util.Optional<java.lang.String>
signature()
Gets the signature of this property.java.lang.String
value()
Gets the value of this property.-
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
-
-
-
Field Detail
-
TEXTURES
static final java.lang.String TEXTURES
The name of thetextures
property.This is used with
Keys.SKIN_PROFILE_PROPERTY
to set the skin of aHumanoid
.- See Also:
- Constant Field Values
-
-
Method Detail
-
of
static ProfileProperty of(java.lang.String name, java.lang.String value)
Creates a new property.- Parameters:
name
- The name for the propertyvalue
- The value of the property- Returns:
- The new property
-
of
static ProfileProperty of(java.lang.String name, java.lang.String value, @Nullable java.lang.String signature)
Creates a new signed property.Depending on the property name, if the signature is provided it must originate from Mojang.
- Parameters:
name
- The name for the propertyvalue
- The value of the propertysignature
- The signature of the property- Returns:
- The new property
-
name
java.lang.String name()
Gets the name of this property.- Returns:
- The name
-
value
java.lang.String value()
Gets the value of this property.- Returns:
- The value
-
signature
java.util.Optional<java.lang.String> signature()
Gets the signature of this property.Depending on the property name, if the signature is provided it must originate from Mojang.
- Returns:
- The signature, or
Optional.empty()
if not present
-
hasSignature
default boolean hasSignature()
Tests if this property has a signature.- Returns:
- Whether this property has a signature
-
-