Class SkullUtils

java.lang.Object
com.cryptomorin.xseries.SkullUtils

public class SkullUtils
extends Object
SkullUtils - Apply skull texture from different sources.
Skull Meta: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/SkullMeta.html Mojang API: https://wiki.vg/Mojang_API
Version:
2.1.0
Author:
Crypto Morin
See Also:
XMaterial
  • Constructor Summary

    Constructors 
    Constructor Description
    SkullUtils()  
  • Method Summary

    Modifier and Type Method Description
    static org.bukkit.inventory.meta.SkullMeta applySkin​(org.bukkit.inventory.meta.ItemMeta head, Object identifier)  
    static String getSkinValue​(String name, boolean isId)
    https://api.mojang.com/users/profiles/minecraft/Username gives the ID https://api.mojang.com/user/profiles/ID without dashes/names gives the names used for the unique ID.
    static String getSkinValue​(org.bukkit.inventory.ItemStack skull)  
    static org.bukkit.inventory.ItemStack getSkull​(UUID id)  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • getSkull

      @Nonnull public static org.bukkit.inventory.ItemStack getSkull​(@Nonnull UUID id)
    • applySkin

      @Nonnull public static org.bukkit.inventory.meta.SkullMeta applySkin​(@Nonnull org.bukkit.inventory.meta.ItemMeta head, @Nonnull Object identifier)
    • getSkinValue

      @Nullable public static String getSkinValue​(@Nonnull org.bukkit.inventory.ItemStack skull)
    • getSkinValue

      @Nonnull public static String getSkinValue​(@Nonnull String name, boolean isId)
      https://api.mojang.com/users/profiles/minecraft/Username gives the ID https://api.mojang.com/user/profiles/ID without dashes/names gives the names used for the unique ID. https://sessionserver.mojang.com/session/minecraft/profile/ID example data:

       {
            "id": "Without dashes -",
            "name": "",
            "properties": [
            {
                "name": "textures",
                "value": ""
            }
            ]
       }