mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-10 10:20:44 -07:00
Fixed screenshot NPE when not logged in
This commit is contained in:
parent
328e24e243
commit
70c3455df8
1 changed files with 2 additions and 1 deletions
|
|
@ -276,7 +276,8 @@ public class API {
|
|||
public static void Screenshot(String... subfolders) {
|
||||
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", subfolders);
|
||||
String username = PlayerList.self != null && PlayerList.self.username != null && !PlayerList.self.username.toString().isEmpty() ? PlayerList.self.username.toString() : "2009Scape";
|
||||
client.instance.saveScreenshot( username + "_" + dateTime + ".png", subfolders);
|
||||
}
|
||||
|
||||
public static void PlaySound(int volume, int trackId, int delay) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue