Class Skin
java.lang.Object
com.github.mafelp.minecraft.skins.Skin
Class with information about a Player's skin
-
Field Summary
Modifier and TypeFieldDescriptionprivate BufferedImage
A sub image containing the head of a playerprivate File
The file which contains the headprivate org.bukkit.entity.Player
The player whose skin is storedprivate BufferedImage
The skin imageprivate File
The directory which contains the subdirectories skins/ and heads/private File
The directory which contains all the head filesprivate File
The directory which contains all the skin filesprivate File
The file which contains BufferedImage skinprivate static String
The format of the image (minecraft skins are always png) -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetHead()
Getter for the head imageGetter for the file which contains the head.org.bukkit.entity.Player
Getter for the Player whose skin is stored in this classgetSkin()
Getter for the imageGetter for the directory which contains the child directoriesskin/
andhead/
Getter for the directory in which all the heads are storedGetter for the directory with contains the skinsGetter for the skin filestatic String
Returns the skinFormat
-
Field Details
-
player
private final org.bukkit.entity.Player playerThe player whose skin is stored -
skinDirectory
The directory which contains the subdirectories skins/ and heads/ -
skinFormat
The format of the image (minecraft skins are always png)- See Also:
- Constant Field Values
-
skin
The skin image -
skinFile
The file which contains BufferedImage skin -
skinDirectorySkins
The directory which contains all the skin files -
head
A sub image containing the head of a player -
headFile
The file which contains the head -
skinDirectoryHeads
The directory which contains all the head files
-
-
Constructor Details
-
Skin
public Skin(org.bukkit.entity.Player player, boolean getSkinFromMojang)Main constructor- Parameters:
player
- The Player whose skin to store in this classgetSkinFromMojang
- If the skin should be downloaded from Mojang
-
Skin
public Skin(org.bukkit.entity.Player player)Creates a skin class and gets the skin and head from the stored files.- Parameters:
player
- the player to store its skin in.
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Getter for the Player whose skin is stored in this class- Returns:
- the player
-
getSkinDirectory
Getter for the directory which contains the child directoriesskin/
andhead/
- Returns:
- the parent directory as a file
-
getSkinFormat
Returns the skinFormat- Returns:
- ".png"
-
getSkin
Getter for the image- Returns:
- The skin as an image
-
getSkinFile
Getter for the skin file- Returns:
- file in which the skin is stored
-
getSkinDirectorySkins
Getter for the directory with contains the skins- Returns:
- File of the Directory in which are all the skin files
-
getHead
Getter for the head image- Returns:
- the head
-
getHeadFile
Getter for the file which contains the head.- Returns:
- The file which contains the head
-
getSkinDirectoryHeads
Getter for the directory in which all the heads are stored- Returns:
- the directory in which the heads are stored
-