@@ -120,6 +120,29 @@ public interface ScreenshotConfig extends Config
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "kills",
|
||||||
|
name = "Screenshot PvP Kills",
|
||||||
|
description = "Configures whether or not screenshots are automatically taken of PvP kills",
|
||||||
|
position = 8
|
||||||
|
)
|
||||||
|
default boolean screenshotKills()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "boss",
|
||||||
|
name = "Screenshot Boss Kills",
|
||||||
|
description = "Configures whether or not screenshots are automatically taken of boss kills",
|
||||||
|
position = 9
|
||||||
|
)
|
||||||
|
default boolean screenshotBossKills()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "hotkey",
|
keyName = "hotkey",
|
||||||
name = "Screenshot hotkey",
|
name = "Screenshot hotkey",
|
||||||
@@ -130,15 +153,4 @@ public interface ScreenshotConfig extends Config
|
|||||||
{
|
{
|
||||||
return Keybind.NOT_SET;
|
return Keybind.NOT_SET;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
|
||||||
keyName = "kills",
|
|
||||||
name = "Screenshot PvP Kills",
|
|
||||||
description = "Configures whether or not screenshots are automatically taken of PvP kills",
|
|
||||||
position = 9
|
|
||||||
)
|
|
||||||
default boolean screenshotKills()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
|
|
||||||
private static final Pattern NUMBER_PATTERN = Pattern.compile("([0-9]+)");
|
private static final Pattern NUMBER_PATTERN = Pattern.compile("([0-9]+)");
|
||||||
private static final Pattern LEVEL_UP_PATTERN = Pattern.compile(".*Your ([a-zA-Z]+) (?:level is|are)? now (\\d+)\\.");
|
private static final Pattern LEVEL_UP_PATTERN = Pattern.compile(".*Your ([a-zA-Z]+) (?:level is|are)? now (\\d+)\\.");
|
||||||
|
private static final Pattern BOSSKILL_MESSAGE_PATTERN = Pattern.compile("Your (.+) kill count is: <col=ff0000>(\\d+)</col>.");
|
||||||
private static final ImmutableList<String> PET_MESSAGES = ImmutableList.of("You have a funny feeling like you're being followed",
|
private static final ImmutableList<String> PET_MESSAGES = ImmutableList.of("You have a funny feeling like you're being followed",
|
||||||
"You feel something weird sneaking into your backpack",
|
"You feel something weird sneaking into your backpack",
|
||||||
"You have a funny feeling like you would have been followed");
|
"You have a funny feeling like you would have been followed");
|
||||||
@@ -344,6 +344,18 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
String fileName = "Kill " + format(new Date());
|
String fileName = "Kill " + format(new Date());
|
||||||
takeScreenshot(fileName);
|
takeScreenshot(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.screenshotBossKills() )
|
||||||
|
{
|
||||||
|
Matcher m = BOSSKILL_MESSAGE_PATTERN.matcher(chatMessage);
|
||||||
|
if (m.matches())
|
||||||
|
{
|
||||||
|
String bossName = m.group(1);
|
||||||
|
String bossKillcount = m.group(2);
|
||||||
|
String fileName = bossName + " kill " + bossKillcount;
|
||||||
|
takeScreenshot(fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
|||||||
Reference in New Issue
Block a user