diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java index 164fe7dbdd..2158de75e3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java @@ -153,11 +153,22 @@ public interface ScreenshotConfig extends Config return false; } + @ConfigItem( + keyName = "friendDeath", + name = "Screenshot Friend Deaths", + description = "Configures whether or not screenshots are automatically taken when friends or clan members die.", + position = 11 + ) + default boolean screenshotFriendDeath() + { + return false; + } + @ConfigItem( keyName = "duels", name = "Screenshot Duels", description = "Configures whether or not screenshots are automatically taken of the duel end screen.", - position = 11 + position = 12 ) default boolean screenshotDuels() { @@ -168,7 +179,7 @@ public interface ScreenshotConfig extends Config keyName = "valuableDrop", name = "Screenshot Valuable drops", description = "Configures whether or not screenshots are automatically taken when you receive a valuable drop.", - position = 12 + position = 13 ) default boolean screenshotValuableDrop() { @@ -179,7 +190,7 @@ public interface ScreenshotConfig extends Config keyName = "untradeableDrop", name = "Screenshot Untradeable drops", description = "Configures whether or not screenshots are automatically taken when you receive an untradeable drop.", - position = 13 + position = 14 ) default boolean screenshotUntradeableDrop() { @@ -190,10 +201,10 @@ public interface ScreenshotConfig extends Config keyName = "hotkey", name = "Screenshot hotkey", description = "When you press this key a screenshot will be taken", - position = 14 + position = 15 ) default Keybind hotkey() { return Keybind.NOT_SET; } -} \ No newline at end of file +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java index 5510a09635..2867e4d9f6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java @@ -281,10 +281,15 @@ public class ScreenshotPlugin extends Plugin @Subscribe public void onPlayerDeath(PlayerDeath playerDeath) { - if (playerDeath.getPlayer() == client.getLocalPlayer() && config.screenshotPlayerDeath()) + Player player = playerDeath.getPlayer(); + if (player == client.getLocalPlayer() && config.screenshotPlayerDeath()) { takeScreenshot("Death " + format(new Date())); } + else if ((player.isClanMember() || player.isFriend()) && config.screenshotFriendDeath() && player.getCanvasTilePoly() != null) + { + takeScreenshot("Death " + player.getName() + " " + format(new Date())); + } } @Subscribe