mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2026-08-01 14:39:16 -06:00
Added screenshot functionality to API
This commit is contained in:
parent
2e2e3c2edc
commit
75e6a68925
1 changed files with 8 additions and 0 deletions
|
|
@ -8,7 +8,9 @@ import rt4.Font;
|
|||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
import static rt4.MathUtils.clamp;
|
||||
import static rt4.Player.plane;
|
||||
|
|
@ -270,6 +272,12 @@ public class API {
|
|||
public static void DispatchCommand(String command) {
|
||||
Cheat.sendCheatPacket(JagString.of(command));
|
||||
}
|
||||
|
||||
public static void Screenshot() {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd-HH_mm_ss");
|
||||
String dateTime = dateFormat.format(new Date());
|
||||
client.instance.saveScreenshot(PlayerList.self.username.toString() + "_" + dateTime + ".png");
|
||||
}
|
||||
|
||||
public static void PlaySound(int volume, int trackId, int delay) {
|
||||
SoundPlayer.play(volume, trackId, delay);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue