Enum Class NameAvailability
- All Implemented Interfaces:
Serializable, Comparable<NameAvailability>, Constable
Whether a username can be claimed, from
GET /minecraft/profile/name/{name}/available.- Since:
- 0.11.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe name is free to claim.The name is taken.The name cannot be claimed — blocked, reserved, or otherwise disallowed.The endpoint returned a status this release does not recognise. -
Method Summary
Modifier and TypeMethodDescriptionstatic NameAvailabilityMaps the endpoint'sstatusstring onto a value.static NameAvailabilityReturns the enum constant of this class with the specified name.static NameAvailability[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AVAILABLE
-
DUPLICATE
-
NOT_ALLOWED
The name cannot be claimed — blocked, reserved, or otherwise disallowed. The endpoint does not say which, so neither does this; a host reports it as "not allowed" rather than guessing a reason.- Since:
- 0.11.0
-
UNKNOWN
The endpoint returned a status this release does not recognise.- Since:
- 0.11.0
-
-
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
-
from
Maps the endpoint'sstatusstring onto a value.- Parameters:
status- the raw status, or null- Returns:
- the matching availability,
UNKNOWNfor anything unrecognised - Since:
- 0.11.0
-