Class SkullTexture.Profile

java.lang.Object
com.saicone.rtag.util.SkullTexture.Profile
Enclosing class:
SkullTexture

public static class SkullTexture.Profile extends Object
Item profile representation, can be static of dynamic profile.
  • Method Details

    • empty

      @NotNull public static @NotNull SkullTexture.Profile empty()
      Get empty profile representation value.
      This profile will always return false on isValid().
      Returns:
      an empty profile.
    • valueOf

      Create a profile value with provided parameters.
      This profile will always return false on isValid().
      Parameters:
      texture - a base64-encoded texture value.
      Returns:
      a newly generated profile value.
    • valueOf

      Create a profile value with provided parameters.
      Parameters:
      uniqueId - the player id.
      name - the player name.
      Returns:
      a newly generated profile value.
    • valueOf

      Create a profile value with provided parameters.
      Parameters:
      uniqueId - the player id.
      name - the player name.
      texture - a base64-encoded texture value.
      Returns:
      a newly generated profile value.
    • valueOf

      Create a profile value with provided parameters.
      Parameters:
      uniqueId - the player id.
      name - the player name.
      texture - a base64-encoded texture value.
      signature - a signature for texture value.
      Returns:
      a newly generated profile value.
    • isJava

      public boolean isJava()
      Check if this profile correspond to a randomly-generate unique id, normally used on MC Java accounts.
      Returns:
      true if the current profile id is version 4.
    • isOffline

      public boolean isOffline()
      Check if this profile correspond to a name-generated unique id, normally used on offline Java accounts.
      Returns:
      true if the current profile id is version 3.
    • isBedrock

      public boolean isBedrock()
      Check if this profile correspond to a Bedrock account.
      Returns:
      true if the current profile id is an xbox id.
    • isValid

      public boolean isValid()
      Check if this profile is provided by a real id.
      Returns:
      true if this profile is valid.
    • isEmpty

      public boolean isEmpty()
      Check if this profile doesn't contain a texture value.
      Returns:
      true if this profiles is empty.
    • isStatic

      public boolean isStatic()
      Check if this profile will not be automatically resolved.
      Returns:
      true if this profile is static.
    • isDynamic

      public boolean isDynamic()
      Check if this profile will be automatically resolved.
      Returns:
      true if this profile is dynamic.
    • getUniqueId

      public UUID getUniqueId()
      Gets the unique ID of this profile, on dynamic profiles this can be null.
      Returns:
      an unique id.
    • getName

      public String getName()
      Gets the display name of this profile, on dynamic profiles this can be null.
      Returns:
      a player name.
    • getTexture

      @NotNull public @NotNull Optional<String> getTexture()
      Gets the texture value of this profile.
      Returns:
      an optional base64-encoded texture value.
    • getTextureJson

      @NotNull public @NotNull Optional<com.google.gson.JsonObject> getTextureJson()
      Gets the json representation of this profile texture value.
      Returns:
      an optional json texture value.
    • getSignature

      @NotNull public @NotNull Optional<String> getSignature()
      Gets the signature of this profile texture value.
      Returns:
      an optional signature value.
    • getSkinUrl

      @NotNull public @NotNull Optional<URL> getSkinUrl()
      Gets the skin url of this profile texture value.
      Returns:
      an optional extracted url from texture value.
    • getCapeUrl

      @NotNull public @NotNull Optional<URL> getCapeUrl()
      Gets the cape url of this profile texture value.
      Returns:
      an optional extracted url from texture value.
    • toString

      public String toString()
      Overrides:
      toString in class Object