diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-08-02 10:58:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-02 10:58:27 +0200 |
commit | db0871cfa3ac68dc60817a3c757567abf1a499ae (patch) | |
tree | 1e8d7a31a6bef8cd08363bddbc10847d5f5c6a3d /src/main/java | |
parent | 0dd320def6e7cec44e360de1f098805402fd8936 (diff) | |
download | skyhanni-db0871cfa3ac68dc60817a3c757567abf1a499ae.tar.gz skyhanni-db0871cfa3ac68dc60817a3c757567abf1a499ae.tar.bz2 skyhanni-db0871cfa3ac68dc60817a3c757567abf1a499ae.zip |
Fix: Pablo Helper Abiphone (#2288)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt index 0ada23ab4..aa7cfcafc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt @@ -2,12 +2,11 @@ package at.hannibal2.skyhanni.features.nether import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.GetFromSackAPI -import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveStack import at.hannibal2.skyhanni.utils.RegexUtils.matchMatchers @@ -22,10 +21,22 @@ object PabloHelper { private val config get() = SkyHanniMod.feature.crimsonIsle + // TODO RepoPattern.list does not work, find out why + +// /** +// * REGEX-TEST: §e[NPC] §5Pablo§f: §b✆ §f§rBring me that §aEnchanted Dandelion §fas soon as you can! +// */ +// private val patterns by RepoPattern.list( +// "crimson.pablo.helper", +// "\\[NPC] Pablo: (?:✆ )?Could you bring me an (?<flower>[\\w ]+).*", +// "\\[NPC] Pablo: (?:✆ )?Bring me that (?<flower>[\\w ]+) as soon as you can!", +// ) + private val patterns = listOf( - "\\[NPC] Pablo: Could you bring me an (?<flower>[\\w ]+).*".toPattern(), - "\\[NPC] Pablo: Bring me that (?<flower>[\\w ]+) as soon as you can!".toPattern() + "\\[NPC] Pablo: (?:✆ )?Could you bring me an (?<flower>[\\w ]+).*".toPattern(), + "\\[NPC] Pablo: (?:✆ )?Bring me that (?<flower>[\\w ]+) as soon as you can!".toPattern(), ) + private var lastSentMessage = SimpleTimeMark.farPast() @SubscribeEvent @@ -40,11 +51,11 @@ object PabloHelper { GetFromSackAPI.getFromChatMessageSackItems( itemName.asInternalName().makePrimitiveStack(), - "Click here to grab an $itemName from sacks!" + "Click here to grab an $itemName from sacks!", ) lastSentMessage = SimpleTimeMark.now() } - fun isEnabled() = IslandType.CRIMSON_ISLE.isInIsland() && config.pabloHelper + fun isEnabled() = LorenzUtils.inSkyBlock && config.pabloHelper } |