java.lang.Object
dev.jensderuiter.minecraft_imagery.Util

public class Util extends Object
  • Field Details

  • Constructor Details

    • Util

      public Util()
  • Method Details

    • getImage

      public static BufferedImage getImage(String name)
      Gets an image using the specified name.
      Parameters:
      name - The name of a block.
      Returns:
      An image if found inside the resources/textures/ folder, otherwise null.
    • getPlayerSkinFront

      public static BufferedImage getPlayerSkinFront(org.bukkit.entity.Player player)
      Puts all front skin parts together to form a front-facing view of the player skin. Also caches the skin view indefinitely in memory.
      Parameters:
      player - The player to get the front skin view from
      Returns:
      An image containing the front-facing view of a skin in 16x32 pixels.
    • getPlayerSkinBack

      public static BufferedImage getPlayerSkinBack(org.bukkit.entity.Player player)
      Puts all backward-facing skin parts together to form a backwards-facing view of the player skin. Also caches the skin view indefinitely in memory.
      Parameters:
      player - The player to get the backwards-facing skin view from
      Returns:
      An image containing the backwards-facing view of a skin in 16x32 pixels.
    • stackTraceToString

      public static String stackTraceToString(Throwable error)
      Converts a throwable's stacktrace to a string. Used for further formatting.
      Parameters:
      error - The throwable to get the stacktrace from.
      Returns:
      The string containing the stacktrace.