Class Skin

java.lang.Object
com.github.mafelp.minecraft.skins.Skin

public class Skin extends Object
Class with information about a Player's skin
  • Field Details

    • player

      private final org.bukkit.entity.Player player
      The player whose skin is stored
    • skinDirectory

      private final File skinDirectory
      The directory which contains the subdirectories skins/ and heads/
    • skinFormat

      private static final String skinFormat
      The format of the image (minecraft skins are always png)
      See Also:
      Constant Field Values
    • skin

      private final BufferedImage skin
      The skin image
    • skinFile

      private final File skinFile
      The file which contains BufferedImage skin
    • skinDirectorySkins

      private final File skinDirectorySkins
      The directory which contains all the skin files
    • headFile

      private final File headFile
      The file which contains the head
    • skinDirectoryHeads

      private final File 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 class
      getSkinFromMojang - 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 File getSkinDirectory()
      Getter for the directory which contains the child directories skin/ and head/
      Returns:
      the parent directory as a file
    • getSkinFormat

      public static String getSkinFormat()
      Returns the skinFormat
      Returns:
      ".png"
    • getSkin

      public BufferedImage getSkin()
      Getter for the image
      Returns:
      The skin as an image
    • getSkinFile

      public File getSkinFile()
      Getter for the skin file
      Returns:
      file in which the skin is stored
    • getSkinDirectorySkins

      public File getSkinDirectorySkins()
      Getter for the directory with contains the skins
      Returns:
      File of the Directory in which are all the skin files
    • getHead

      public BufferedImage getHead()
      Getter for the head image
      Returns:
      the head
    • getHeadFile

      public File getHeadFile()
      Getter for the file which contains the head.
      Returns:
      The file which contains the head
    • getSkinDirectoryHeads

      public File getSkinDirectoryHeads()
      Getter for the directory in which all the heads are stored
      Returns:
      the directory in which the heads are stored