screenshot plugin: add friend/clan member death screenshotting
This commit is contained in:
@@ -153,11 +153,22 @@ public interface ScreenshotConfig extends Config
|
|||||||
return false;
|
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(
|
@ConfigItem(
|
||||||
keyName = "duels",
|
keyName = "duels",
|
||||||
name = "Screenshot Duels",
|
name = "Screenshot Duels",
|
||||||
description = "Configures whether or not screenshots are automatically taken of the duel end screen.",
|
description = "Configures whether or not screenshots are automatically taken of the duel end screen.",
|
||||||
position = 11
|
position = 12
|
||||||
)
|
)
|
||||||
default boolean screenshotDuels()
|
default boolean screenshotDuels()
|
||||||
{
|
{
|
||||||
@@ -168,7 +179,7 @@ public interface ScreenshotConfig extends Config
|
|||||||
keyName = "valuableDrop",
|
keyName = "valuableDrop",
|
||||||
name = "Screenshot Valuable drops",
|
name = "Screenshot Valuable drops",
|
||||||
description = "Configures whether or not screenshots are automatically taken when you receive a valuable drop.",
|
description = "Configures whether or not screenshots are automatically taken when you receive a valuable drop.",
|
||||||
position = 12
|
position = 13
|
||||||
)
|
)
|
||||||
default boolean screenshotValuableDrop()
|
default boolean screenshotValuableDrop()
|
||||||
{
|
{
|
||||||
@@ -179,7 +190,7 @@ public interface ScreenshotConfig extends Config
|
|||||||
keyName = "untradeableDrop",
|
keyName = "untradeableDrop",
|
||||||
name = "Screenshot Untradeable drops",
|
name = "Screenshot Untradeable drops",
|
||||||
description = "Configures whether or not screenshots are automatically taken when you receive an untradeable drop.",
|
description = "Configures whether or not screenshots are automatically taken when you receive an untradeable drop.",
|
||||||
position = 13
|
position = 14
|
||||||
)
|
)
|
||||||
default boolean screenshotUntradeableDrop()
|
default boolean screenshotUntradeableDrop()
|
||||||
{
|
{
|
||||||
@@ -190,10 +201,10 @@ public interface ScreenshotConfig extends Config
|
|||||||
keyName = "hotkey",
|
keyName = "hotkey",
|
||||||
name = "Screenshot hotkey",
|
name = "Screenshot hotkey",
|
||||||
description = "When you press this key a screenshot will be taken",
|
description = "When you press this key a screenshot will be taken",
|
||||||
position = 14
|
position = 15
|
||||||
)
|
)
|
||||||
default Keybind hotkey()
|
default Keybind hotkey()
|
||||||
{
|
{
|
||||||
return Keybind.NOT_SET;
|
return Keybind.NOT_SET;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -281,10 +281,15 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onPlayerDeath(PlayerDeath playerDeath)
|
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()));
|
takeScreenshot("Death " + format(new Date()));
|
||||||
}
|
}
|
||||||
|
else if ((player.isClanMember() || player.isFriend()) && config.screenshotFriendDeath() && player.getCanvasTilePoly() != null)
|
||||||
|
{
|
||||||
|
takeScreenshot("Death " + player.getName() + " " + format(new Date()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
|||||||
Reference in New Issue
Block a user