Class SkullUtils
Skull Meta: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/SkullMeta.html Mojang API: https://wiki.vg/Mojang_API
Some websites to get custom heads:
- https://minecraft-heads.com/
The basic premise behind this API is that the final skull data is contained in a GameProfile
either by ID, name or encoded textures URL property.
Different versions of Minecraft client handle this differently. In newer versions the client seem to prioritize the texture property over the set UUID and name, in older versions however using the same UUID for all GameProfiles caused all skulls (that use base64) to look the same. The client is responsible for caching skull textures. If the download were to fail (either because of connection issues or invalid values) the client will cache that skull UUID and the skull will remain as a steve head until the client is completely restarted. I don't know if this cache system works across other servers or is just specific to one server.
- Version:
- 6.0.0.1
- Author:
- Crypto Morin
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final MethodHandleprotected static final MethodHandleprotected static final MethodHandleprotected static final MethodHandle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.inventory.meta.SkullMetastatic org.bukkit.inventory.meta.SkullMetastatic org.bukkit.inventory.meta.SkullMetaapplySkin(org.bukkit.inventory.meta.ItemMeta head, org.bukkit.OfflinePlayer identifier) static com.mojang.authlib.GameProfiledetectProfileFromString(String identifier) static com.cryptomorin.xseries.SkullUtils.StringSkullCachedetectSkullValueType(String identifier) static StringencodeTexturesURL(String url) static StringgetSkinValue(org.bukkit.inventory.meta.ItemMeta skull) static org.bukkit.inventory.ItemStackstatic com.mojang.authlib.GameProfileprofileFromBase64(String base64, String MojangSHA) static com.mojang.authlib.GameProfileprofileFromPlayer(org.bukkit.OfflinePlayer player) static voidstatic org.bukkit.inventory.meta.SkullMetasetSkullBase64(org.bukkit.inventory.meta.SkullMeta head, String value, String MojangSHA)
-
Field Details
-
CRAFT_META_SKULL_PROFILE_GETTER
-
CRAFT_META_SKULL_PROFILE_SETTER
-
CRAFT_META_SKULL_BLOCK_SETTER
-
PROPERTY_GETVALUE
-
-
Constructor Details
-
SkullUtils
public SkullUtils()
-
-
Method Details
-
getSkull
-
applySkin
-
applySkin
-
applySkin
@Nonnull public static org.bukkit.inventory.meta.SkullMeta applySkin(@Nonnull org.bukkit.inventory.meta.ItemMeta head, @Nonnull String identifier) - Parameters:
identifier- Can be a player name, player UUID, Base64, or a minecraft.net skin link.
-
setSkullBase64
-
profileFromBase64
-
profileFromPlayer
@Nonnull public static com.mojang.authlib.GameProfile profileFromPlayer(org.bukkit.OfflinePlayer player) -
detectProfileFromString
-
detectSkullValueType
-
setSkin
-
encodeTexturesURL
-
getSkinValue
-