diff options
| author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-04-07 11:01:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-07 11:01:41 +0200 |
| commit | f31e5aa4218b77e54f9438adc629c1c2bdd3e291 (patch) | |
| tree | 4f7c6625b0bcc631fa755585ea1739affc143b64 /src/main/java/at/hannibal2/skyhanni/utils | |
| parent | 3cda068bcbb9b98a8e7704f5e14fffa535c079a1 (diff) | |
| download | skyhanni-f31e5aa4218b77e54f9438adc629c1c2bdd3e291.tar.gz skyhanni-f31e5aa4218b77e54f9438adc629c1c2bdd3e291.tar.bz2 skyhanni-f31e5aa4218b77e54f9438adc629c1c2bdd3e291.zip | |
Improvement: Allow receiving inquisitor information from all chat (#1316)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index c45bcae0e..df622503a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -356,9 +356,9 @@ object LorenzUtils { * Get the group, otherwise, return null * @param groupName The group name in the pattern */ - fun Matcher.groupOrNull(groupName: String): String? { - return runCatching { this.group(groupName) }.getOrNull() - } + fun Matcher.groupOrNull(groupName: String): String? = runCatching { this.group(groupName) }.getOrNull() + + fun Matcher.hasGroup(groupName: String): Boolean = groupOrNull(groupName) != null fun inAdvancedMiningIsland() = IslandType.DWARVEN_MINES.isInIsland() || IslandType.CRYSTAL_HOLLOWS.isInIsland() || IslandType.MINESHAFT.isInIsland() |
