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 UUID uuid,
                              @Nullable
                              @Nullable Skin skin)
    • Method Detail

      • getNickname

        @NotNull
        public @NotNull String getNickname()
        Returns the nickname, for which data was requested.
        Returns:
        nickname (ign)
      • getUuid

        public Optional<UUID> getUuid()
        Returns the UUID of the specified getNickname(), according to mojang api. The return value may be empty if the plugin wasn't able to fetch it.
        Returns:
        uuid, according to mojang api, or empty optional if failure
      • getSkin

        public Optional<Skin> getSkin()
        Returns the Skin of the specified getUuid(), according to mojang api. The return value may be empty if the plugin wasn't able to fetch getUuid() or wasn't able to fetch the skin.
        Returns:
        skin, or empty optional if failure