Package com.ranull.graves.util
Class SkinTextureUtil
java.lang.Object
com.ranull.graves.util.SkinTextureUtil
Utility class for handling player skins and textures.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
findGameProfileMethod
(Object playerObject) Finds and sets the method name for retrieving a GameProfile.static com.mojang.authlib.GameProfile
getPlayerGameProfile
(org.bukkit.entity.Player player) Retrieves the GameProfile of a Player.static String
getTexture
(org.bukkit.entity.Entity entity) Retrieves the texture of an Entity.static void
setSkullBlockTexture
(org.bukkit.block.Skull skull, String name, String base64) Sets the texture of a Skull block.static void
setSkullBlockTexture
(org.bukkit.inventory.meta.SkullMeta skullMeta, String name, String base64) Sets the texture of a Skull item stack.
-
Field Details
-
GAMEPROFILE_METHOD
-
-
Constructor Details
-
SkinTextureUtil
public SkinTextureUtil()
-
-
Method Details
-
setSkullBlockTexture
Sets the texture of a Skull block.- Parameters:
skull
- The Skull block.name
- The name associated with the texture.base64
- The Base64 encoded texture.
-
setSkullBlockTexture
public static void setSkullBlockTexture(org.bukkit.inventory.meta.SkullMeta skullMeta, String name, String base64) Sets the texture of a Skull item stack.- Parameters:
skullMeta
- The SkullMeta item meta.name
- The name associated with the texture.base64
- The Base64 encoded texture.
-
getTexture
Retrieves the texture of an Entity.- Parameters:
entity
- The entity from which to get the texture.- Returns:
- The Base64 encoded texture string, or null if not found.
-
getPlayerGameProfile
public static com.mojang.authlib.GameProfile getPlayerGameProfile(org.bukkit.entity.Player player) Retrieves the GameProfile of a Player.- Parameters:
player
- The player from which to get the GameProfile.- Returns:
- The GameProfile of the player, or null if not found.
-
findGameProfileMethod
Finds and sets the method name for retrieving a GameProfile.- Parameters:
playerObject
- The player object from which to find the method.
-