Class PlayerSkin

java.lang.Object
net.minestom.server.entity.PlayerSkin

public class PlayerSkin
extends java.lang.Object
Contains all the data required to store a skin.

Can be applied to a player with Player.setSkin(PlayerSkin) or in the linked event PlayerSkinInitEvent.

  • Constructor Summary

    Constructors 
    Constructor Description
    PlayerSkin​(java.lang.String textures, java.lang.String signature)  
  • Method Summary

    Modifier and Type Method Description
    static PlayerSkin fromUsername​(java.lang.String username)
    Gets a skin from a Minecraft username.
    static PlayerSkin fromUuid​(java.lang.String uuid)
    Gets a skin from a Mojang UUID.
    java.lang.String getSignature()
    Gets the skin signature.
    java.lang.String getTextures()
    Gets the skin textures value.

    Methods inherited from class java.lang.Object

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

    • PlayerSkin

      public PlayerSkin​(java.lang.String textures, java.lang.String signature)
  • Method Details

    • getTextures

      public java.lang.String getTextures()
      Gets the skin textures value.
      Returns:
      the textures value
    • getSignature

      public java.lang.String getSignature()
      Gets the skin signature.
      Returns:
      the skin signature
    • fromUuid

      @Nullable public static PlayerSkin fromUuid​(@NotNull java.lang.String uuid)
      Gets a skin from a Mojang UUID.
      Parameters:
      uuid - Mojang UUID
      Returns:
      a player skin based on the UUID, null if not found
    • fromUsername

      @Nullable public static PlayerSkin fromUsername​(@NotNull java.lang.String username)
      Gets a skin from a Minecraft username.
      Parameters:
      username - the Minecraft username
      Returns:
      a skin based on a Minecraft username, null if not found