Class Skin
java.lang.Object
com.github.mafelp.minecraft.skins.Skin
public class Skin
extends java.lang.Object
Class with information about a Player's skin
-
Field Summary
Fields Modifier and Type Field Description private java.awt.image.BufferedImageheadA sub image containing the head of a playerprivate java.io.FileheadFileThe file which contains the headprivate org.bukkit.entity.PlayerplayerThe player whose skin is storedprivate java.awt.image.BufferedImageskinThe skin imageprivate java.io.FileskinDirectoryThe directory which contains the subdirectories skins/ and heads/private java.io.FileskinDirectoryHeadsThe directory which contains all the head filesprivate java.io.FileskinDirectorySkinsThe directory which contains all the skin filesprivate java.io.FileskinFileThe file which contains BufferedImage skinprivate static java.lang.StringskinFormatThe format of the image (minecraft skins are always png) -
Constructor Summary
-
Method Summary
Modifier and Type Method Description java.awt.image.BufferedImagegetHead()Getter for the head imagejava.io.FilegetHeadFile()Getter for the file which contains the head.org.bukkit.entity.PlayergetPlayer()Getter for the Player whose skin is stored in this classjava.awt.image.BufferedImagegetSkin()Getter for the imagejava.io.FilegetSkinDirectory()Getter for the directory which contains the child directoriesskin/andhead/java.io.FilegetSkinDirectoryHeads()Getter for the directory in which all the heads are storedjava.io.FilegetSkinDirectorySkins()Getter for the directory with contains the skinsjava.io.FilegetSkinFile()Getter for the skin filestatic java.lang.StringgetSkinFormat()Returns the skinFormatMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
player
private final org.bukkit.entity.Player playerThe player whose skin is stored -
skinDirectory
private final java.io.File skinDirectoryThe directory which contains the subdirectories skins/ and heads/ -
skinFormat
private static final java.lang.String skinFormatThe format of the image (minecraft skins are always png)- See Also:
- Constant Field Values
-
skin
private final java.awt.image.BufferedImage skinThe skin image -
skinFile
private final java.io.File skinFileThe file which contains BufferedImage skin -
skinDirectorySkins
private final java.io.File skinDirectorySkinsThe directory which contains all the skin files -
head
private final java.awt.image.BufferedImage headA sub image containing the head of a player -
headFile
private final java.io.File headFileThe file which contains the head -
skinDirectoryHeads
private final java.io.File skinDirectoryHeadsThe 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
public java.io.File getSkinDirectory()Getter for the directory which contains the child directoriesskin/andhead/- Returns:
- the parent directory as a file
-
getSkinFormat
public static java.lang.String getSkinFormat()Returns the skinFormat- Returns:
- ".png"
-
getSkin
public java.awt.image.BufferedImage getSkin()Getter for the image- Returns:
- The skin as an image
-
getSkinFile
public java.io.File getSkinFile()Getter for the skin file- Returns:
- file in which the skin is stored
-
getSkinDirectorySkins
public java.io.File getSkinDirectorySkins()Getter for the directory with contains the skins- Returns:
- File of the Directory in which are all the skin files
-
getHead
public java.awt.image.BufferedImage getHead()Getter for the head image- Returns:
- the head
-
getHeadFile
public java.io.File getHeadFile()Getter for the file which contains the head.- Returns:
- The file which contains the head
-
getSkinDirectoryHeads
public java.io.File getSkinDirectoryHeads()Getter for the directory in which all the heads are stored- Returns:
- the directory in which the heads are stored
-