screenshot plugin: add friend/clan member death screenshotting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user