Class MojangResponse


  • public final class MojangResponse
    extends Object
    Represents a response object from the mojang api
    • 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 uuid
        Returns the UUID of the specified getNickname(), according to the DataProvider set in the SkinsApi. 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 the Skin, held by this response.
        Returns:
        skin, or empty optional if failure
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object