public class ScreenshotEvent extends Event
MinecraftForge.EVENT_BUS
This event is Cancelable
screenshotFile
contains the file the screenshot will be/was saved to
image
contains the BufferedImage
that will be saved
resultMessage
contains the ITextComponent
to be returned. If null
, the default vanilla message will be used insteadEvent.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
static ITextComponent |
DEFAULT_CANCEL_REASON |
private java.awt.image.BufferedImage |
image |
private ITextComponent |
resultMessage |
private java.io.File |
screenshotFile |
Constructor and Description |
---|
ScreenshotEvent(java.awt.image.BufferedImage image,
java.io.File screenshotFile) |
Modifier and Type | Method and Description |
---|---|
ITextComponent |
getCancelMessage() |
java.awt.image.BufferedImage |
getImage() |
ITextComponent |
getResultMessage() |
java.io.File |
getScreenshotFile() |
void |
setResultMessage(ITextComponent resultMessage) |
void |
setScreenshotFile(java.io.File screenshotFile) |
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public static final ITextComponent DEFAULT_CANCEL_REASON
private java.awt.image.BufferedImage image
private java.io.File screenshotFile
private ITextComponent resultMessage
public ScreenshotEvent(java.awt.image.BufferedImage image, java.io.File screenshotFile)
public java.awt.image.BufferedImage getImage()
public java.io.File getScreenshotFile()
public void setScreenshotFile(java.io.File screenshotFile)
public ITextComponent getResultMessage()
public void setResultMessage(ITextComponent resultMessage)
public ITextComponent getCancelMessage()