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.BufferedImage head
    A sub image containing the head of a player
    private java.io.File headFile
    The file which contains the head
    private org.bukkit.entity.Player player
    The player whose skin is stored
    private java.awt.image.BufferedImage skin
    The skin image
    private java.io.File skinDirectory
    The directory which contains the subdirectories skins/ and heads/
    private java.io.File skinDirectoryHeads
    The directory which contains all the head files
    private java.io.File skinDirectorySkins
    The directory which contains all the skin files
    private java.io.File skinFile
    The file which contains BufferedImage skin
    private static java.lang.String skinFormat
    The format of the image (minecraft skins are always png)
  • Constructor Summary

    Constructors
    Constructor Description
    Skin​(org.bukkit.entity.Player player)
    Creates a skin class and gets the skin and head from the stored files.
    Skin​(org.bukkit.entity.Player player, boolean getSkinFromMojang)
    Main constructor
  • Method Summary

    Modifier and Type Method Description
    java.awt.image.BufferedImage getHead()
    Getter for the head image
    java.io.File getHeadFile()
    Getter for the file which contains the head.
    org.bukkit.entity.Player getPlayer()
    Getter for the Player whose skin is stored in this class
    java.awt.image.BufferedImage getSkin()
    Getter for the image
    java.io.File getSkinDirectory()
    Getter for the directory which contains the child directories skin/ and head/
    java.io.File getSkinDirectoryHeads()
    Getter for the directory in which all the heads are stored
    java.io.File getSkinDirectorySkins()
    Getter for the directory with contains the skins
    java.io.File getSkinFile()
    Getter for the skin file
    static java.lang.String getSkinFormat()
    Returns the skinFormat

    Methods 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 player
      The player whose skin is stored
    • skinDirectory

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

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

      private final java.awt.image.BufferedImage skin
      The skin image
    • skinFile

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

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

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

      private final java.io.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 java.io.File getSkinDirectory()
      Getter for the directory which contains the child directories skin/ and head/
      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