woodcutting plugin: add arctic pine logs
This commit is contained in:
@@ -29,6 +29,7 @@ import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.inject.Inject;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
@@ -63,6 +64,8 @@ import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||
@PluginDependency(XpTrackerPlugin.class)
|
||||
public class WoodcuttingPlugin extends Plugin
|
||||
{
|
||||
private static final Pattern WOOD_CUT_PATTERN = Pattern.compile("You get (?:some|an)[\\w ]+(?:logs?|mushrooms)\\.");
|
||||
|
||||
@Inject
|
||||
private Notifier notifier;
|
||||
|
||||
@@ -148,7 +151,7 @@ public class WoodcuttingPlugin extends Plugin
|
||||
{
|
||||
if (event.getType() == ChatMessageType.SPAM || event.getType() == ChatMessageType.GAMEMESSAGE)
|
||||
{
|
||||
if (event.getMessage().startsWith("You get some") && (event.getMessage().endsWith("logs.") || event.getMessage().endsWith("mushrooms.")))
|
||||
if (WOOD_CUT_PATTERN.matcher(event.getMessage()).matches())
|
||||
{
|
||||
if (session == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user