Package com.mrivanplays.skins.api
Class MojangResponse
- java.lang.Object
-
- com.mrivanplays.skins.api.MojangResponse
-
public final class MojangResponse extends Object
Represents a response object from the mojang api
-
-
Constructor Summary
Constructors Constructor Description MojangResponse(@NotNull String nickname, @Nullable Skin skin)
MojangResponse(@NotNull String nickname, @Nullable UUID uuid, @Nullable Skin skin)
Deprecated.uuid can be retrieved via skin
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
@NotNull String
getNickname()
Returns the nickname, for which data was requested.Optional<Skin>
getSkin()
Returns theSkin
, held by this response.Optional<UUID>
getUuid()
Deprecated.skin object holds a uuidint
hashCode()
-
-
-
Constructor Detail
-
MojangResponse
public MojangResponse(@NotNull @NotNull String nickname, @Nullable @Nullable Skin skin)
-
MojangResponse
@Deprecated public MojangResponse(@NotNull @NotNull String nickname, @Nullable @Nullable UUID uuid, @Nullable @Nullable Skin skin)
Deprecated.uuid can be retrieved via skin
-
-
Method Detail
-
getNickname
@NotNull public @NotNull String getNickname()
Returns the nickname, for which data was requested.- Returns:
- nickname (ign)
-
getUuid
@Deprecated public Optional<UUID> getUuid()
Deprecated.skin object holds a uuidReturns theUUID
of the specifiedgetNickname()
, according to theDataProvider
set in theSkinsApi
. The return value may be empty if the plugin wasn't able to fetch it.- Returns:
- uuid, according to data provider, or empty optional if failure
-
getSkin
public Optional<Skin> getSkin()
Returns theSkin
, held by this response.- Returns:
- skin, or empty optional if failure
-
-