Enum Class ProfileInputType
- All Implemented Interfaces:
Serializable,Comparable<ProfileInputType>,Constable
Different types of input patterns that can be used for identifying
constructing, and validating various formats that can represent a
Profileable.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a Base64 encoded string pattern.Represents a texture hash pattern.Represents a texture URL pattern that includes the base URL followed by the texture hash pattern.Represents a username pattern, allowing alphanumeric characters and underscores, with a length of 1 to 16 characters.Represents a UUID pattern, following the standard UUID format. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionabstract com.mojang.authlib.GameProfilegetProfile(String input) Retrieves aGameProfilebased on the provided input string.static @Nullable ProfileInputTypeReturns the correspondingProfileInputTypefor the given identifier, if it matches any pattern.static ProfileInputTypeReturns the enum constant of this class with the specified name.static ProfileInputType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TEXTURE_HASH
Represents a texture hash pattern. Mojang hashes length are inconsistent, and they don't seem to use uppercase characters.Currently, the shortest observed hash value is (lenght: 57): 0a4050e7aacc4539202658fdc339dd182d7e322f9fbcc4d5f99b5718a
Example: e5461a215b325fbdf892db67b7bfb60ad2bf1580dc968a15dfb304ccd5e74db
-
TEXTURE_URL
Represents a texture URL pattern that includes the base URL followed by the texture hash pattern.Example: http://textures.minecraft.net/texture/e5461a215b325fbdf892db67b7bfb60ad2bf1580dc968a15dfb304ccd5e74db
-
BASE64
Represents a Base64 encoded string pattern. The base64 pattern that's checked is not a general base64 pattern, but a pattern that closely represents the base64 genereated by the NBT data. -
UUID
Represents a UUID pattern, following the standard UUID format. -
USERNAME
Represents a username pattern, allowing alphanumeric characters and underscores, with a length of 1 to 16 characters. Minecraft now requires the username to be at least 3 characters long, but older accounts are still around. It also seems that there are a few inactive accounts that use spaces in their usernames?
-
-
Field Details
-
pattern
The RegEx pattern associated with the input type.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getProfile
Retrieves aGameProfilebased on the provided input string.- Parameters:
input- The input string to retrieve the profile for.- Returns:
- The
GameProfilecorresponding to the input string.
-
typeOf
Returns the correspondingProfileInputTypefor the given identifier, if it matches any pattern.- Parameters:
identifier- The string to be checked against the patterns.- Returns:
- The matching type, or
nullif no match is found.
-