Class ImageCapture

java.lang.Object
dev.jensderuiter.minecraft_imagery.image.ImageCapture

public class ImageCapture extends Object
A class to render a single photo of a Minecraft world and the players in it. Should be instantiated once for every capture. Use .render() to render and get the resulting image capture. It is recommended to ALWAYS CALL .render() ASYNCHRONOUSLY as it can take a while.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ImageCapture(org.bukkit.Location location)
    Creates an instance of the ImageCapture class with no players and no options.
    ImageCapture(org.bukkit.Location location, ImageCaptureOptions options)
    Creates an instance of the ImageCapture class with no players.
    ImageCapture(org.bukkit.Location location, List<org.bukkit.entity.Player> entities)
    Creates an instance of the ImageCapture class with no options.
    ImageCapture(org.bukkit.Location location, List<org.bukkit.entity.Player> entities, ImageCaptureOptions options)
    Creates an instance of the ImageCapture class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Render an image which the instance's location and entities.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImageCapture

      public ImageCapture(org.bukkit.Location location, List<org.bukkit.entity.Player> entities, ImageCaptureOptions options)
      Creates an instance of the ImageCapture class.
      Parameters:
      location - The location from which to capture the image.
      entities - A list of players that could be inside the photo. Players will only be visible in the photo if they are actually in the viewing frame.
    • ImageCapture

      public ImageCapture(org.bukkit.Location location)
      Creates an instance of the ImageCapture class with no players and no options.
      Parameters:
      location - The location from which to capture the image.
    • ImageCapture

      public ImageCapture(org.bukkit.Location location, List<org.bukkit.entity.Player> entities)
      Creates an instance of the ImageCapture class with no options.
      Parameters:
      location - The location from which to capture the image.
    • ImageCapture

      public ImageCapture(org.bukkit.Location location, ImageCaptureOptions options)
      Creates an instance of the ImageCapture class with no players.
      Parameters:
      location - The location from which to capture the image.
  • Method Details

    • render

      public BufferedImage render()
      Render an image which the instance's location and entities. It is recommended to ALWAYS CALL this method ASYNCHRONOUSLY as it can take a while.
      Returns:
      The resulting image (128x128)