screenshot plugin: add configuration for auto screenshot of levelups and rewards

This commit is contained in:
Adam
2018-02-03 20:50:16 -05:00
parent 0035cf9c11
commit 05d079d816
2 changed files with 41 additions and 1 deletions

View File

@@ -68,11 +68,33 @@ public interface ScreenshotConfig extends Config
return true;
}
@ConfigItem(
keyName = "rewards",
name = "Screenshot Rewards",
description = "Configures whether screenshots are taken of clues, barrows, and quest completion",
position = 3
)
default boolean screenshotRewards()
{
return true;
}
@ConfigItem(
keyName = "levels",
name = "Screenshot Levels",
description = "Configures whether screenshots are taken of level ups",
position = 4
)
default boolean screenshotLevels()
{
return true;
}
@ConfigItem(
keyName = "uploadScreenshot",
name = "Upload To Imgur",
description = "Configures whether or not screenshots are uploaded to Imgur and copied into your clipboard",
position = 3
position = 5
)
default boolean uploadScreenshot()
{

View File

@@ -242,6 +242,24 @@ public class ScreenshotPlugin extends Plugin
return;
}
switch (TO_GROUP(widget.getId()))
{
case LEVEL_UP_GROUP_ID:
if (!config.screenshotLevels())
{
return;
}
break;
case QUEST_COMPLETED_GROUP_ID:
case CLUE_SCROLL_REWARD_GROUP_ID:
case BARROWS_REWARD_GROUP_ID:
if (!config.screenshotRewards())
{
return;
}
break;
}
String fileName;
switch (TO_GROUP(widget.getId()))