screenshot plugin: add configuration for auto screenshot of levelups and rewards
This commit is contained in:
@@ -68,11 +68,33 @@ public interface ScreenshotConfig extends Config
|
|||||||
return true;
|
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(
|
@ConfigItem(
|
||||||
keyName = "uploadScreenshot",
|
keyName = "uploadScreenshot",
|
||||||
name = "Upload To Imgur",
|
name = "Upload To Imgur",
|
||||||
description = "Configures whether or not screenshots are uploaded to Imgur and copied into your clipboard",
|
description = "Configures whether or not screenshots are uploaded to Imgur and copied into your clipboard",
|
||||||
position = 3
|
position = 5
|
||||||
)
|
)
|
||||||
default boolean uploadScreenshot()
|
default boolean uploadScreenshot()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -242,6 +242,24 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
return;
|
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;
|
String fileName;
|
||||||
|
|
||||||
switch (TO_GROUP(widget.getId()))
|
switch (TO_GROUP(widget.getId()))
|
||||||
|
|||||||
Reference in New Issue
Block a user