Class MojangResponse


  • public final class MojangResponse
    extends java.lang.Object
    Represents a response object from the mojang api
    • Constructor Summary

      Constructors 
      Constructor Description
      MojangResponse​(@NotNull java.lang.String nickname, @Nullable java.util.UUID uuid, @Nullable Skin skin)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull java.lang.String getNickname()
      Returns the nickname, for which data was requested.
      java.util.Optional<Skin> getSkin()
      Returns the Skin of the specified getUuid(), according to mojang api.
      java.util.Optional<java.util.UUID> getUuid()
      Returns the UUID of the specified getNickname(), according to mojang api.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MojangResponse

        public MojangResponse​(@NotNull
                              @NotNull java.lang.String nickname,
                              @Nullable
                              @Nullable java.util.UUID uuid,
                              @Nullable
                              @Nullable Skin skin)
    • Method Detail

      • getNickname

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

        public java.util.Optional<java.util.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 java.util.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