SkullCreator is a library designed to make the creation of player skulls as easy as possible.
The README file for my plugin is a bit easier on the eyes than looking at this page, so I highly recommend looking at that instead!
https://github.com/Deanveloper/SkullCreator
Usage
Using the SkullCreator library is quite easy! There are three ways to create a player skull. By name, base64, and URL.
By Name
The way that skulls are handled internally use names rather than UUIDs, most likely to make things easier for users to create the heads through commands. As far as I'm aware, there's no easy way to create a player skull from a UUID.
Anyway, the code to create a player skull from a name is
SkullCreator.fromName(Type.ITEM, "Deanveloper");
By Base64
Base64 hashes are how most mapmakers get their heads. They usually go on websites such as freshcoal, mineskin, or minecraft-heads. These sites give them very long commands and they can paste them into command blocks which give them the items.
What you can do with this plugin is take the base64 from after the Value: part of the command, and then paste that into a method to get the skull. For instance, to get a Stormtrooper skull, you can do this:
public static ItemStack getStormtrooper() {
// Got this base64 string from minecraft-heads.com
String base64 = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L" +
"3RleHR1cmUvNTIyODRlMTMyYmZkNjU5YmM2YWRhNDk3YzRmYTMwOTRjZDkzMjMxYTZiNTA1YTEyY2U3Y2Q1MTM1YmE4ZmY5MyJ9fX0=";
return SkullCreator.fromBase64(Type.ITEM, base64);
}
By Mojang URL
The base64 strings contain an encoded Mojang URL inside of them. If you would not like to store the whole base64 string (after all, they are very long!) you can instead store the link to the URL.
public static ItemStack getCheeseSkull() {
String s = "http://textures.minecraft.net/texture/955d611a878e821231749b2965708cad942650672db09e26847a88e2fac2946";
return SkullCreator.fromUrl(Type.ITEM, s);
}
Note that with any of these methods, if you substitute the "from" with "with", you can supply an ItemStack and the plugin will add the skull data onto the item you provide. (ie SkullCreator.withName(item, "Deanveloper"); )
Installation
The library can be installed by either inserting the SkullCreator file or through Maven. The instructions can be found here: https://github.com/Deanveloper/SkullCreator/tree/master#installation
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta